Skip to content

Reporting API Report body - how do I document the COEP body report? #27021

Open
@hamishwillee

Description

@hamishwillee

What type of issue is this?

Other

What information was incorrect, unhelpful, or incomplete?

The reporting API currently defines a Report instance that has a Report.body property that derives from ReportBody. For example CSPViolationReportBody.
This all works rather nicely w.r.t. docs and BCD because the objects are all in IDL and so have a well understood name, derivation and their own API existence.

Unfortunately this is about to change. I'm documenting the body object for the report for COEP and COOP violations in mdn/content#39880.
For this case the specification does not define any IDL for the body object or state that it is derived from ReportBody. In fact they are planning on changing the spec for all of the body objects such that Report is a dictionary and ReportBody is an abstract dictionary.

In docs what I have done is define my own dictionary COEPViolationReportBody for COEP violation bodies. BCD doesn't document dictionaries, so what is the right way to record support for this?

I THINK that right now Report is an object so what we probably should do is

  • add a subfeature under Report.type indicating each of the supported types (and we probably should do that anyway).
  • under that add a subfeature indicating the properties allowed in each type.
  1. Sounds complicated
  2. Report will become a dictionary - what do we do then?
  3. Right now we have some things that are derived from ReportBody, and some that aren't - how do we manage that?

What browsers does this problem apply to, if applicable?

No response

What did you expect to see?

NA

Did you test this? If so, how?

NA

Can you link to any release notes, bugs, pull requests, or MDN pages related to this?

NA

Do you have anything more you want to share?

https://developer.mozilla.org/en-US/docs/Web/API/Reporting_API

MDN URL

No response

MDN metadata

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    meeting agendaIssues or pull requests in need of discussion in a project meeting.questionIssues where a question or problem is stated and a discussion is held to gather opinions.

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions