Skip to content

ReportingAPI: List of reports - draft#43782

Draft
hamishwillee wants to merge 1 commit intomdn:mainfrom
hamishwillee:reporting_api_lists
Draft

ReportingAPI: List of reports - draft#43782
hamishwillee wants to merge 1 commit intomdn:mainfrom
hamishwillee:reporting_api_lists

Conversation

@hamishwillee
Copy link
Copy Markdown
Collaborator

@hamishwillee hamishwillee commented Apr 14, 2026

@github-actions github-actions bot added Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed labels Apr 14, 2026

A list of documented report types and their corresponding report dictionary are given in the [`options.types`](/en-US/docs/Web/API/ReportingObserver/ReportingObserver#types) parameter passed to the `ReportingObserver()` constructor.

##### XXXXX
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[markdownlint] reported by reviewdog 🐶
error MD001/heading-increment Heading levels should only increment by one level at a time [Expected: h4; Actual: h5]

@github-actions
Copy link
Copy Markdown
Contributor

Preview URLs (1 page)

Flaws (6)

Found an unexpected or unresolvable flaw? Please report it here.

URL: /en-US/docs/Web/API/Reporting_API
Title: Reporting API
Flaw count: 6

  • macros:
    • Macro domxref produces link /en-US/docs/Web/API/COOPViolationReport which doesn't resolve
    • Macro domxref produces link /en-US/docs/Web/API/CrashReport which doesn't resolve
    • Macro domxref produces link /en-US/docs/Web/API/DocumentPolicyViolationReport which doesn't resolve
    • Macro httpheader produces link /en-US/docs/Web/HTTP/Reference/Headers/Document-Policy which doesn't resolve
    • Macro domxref produces link /en-US/docs/Web/API/NetworkErrorReport which doesn't resolve
    • and 1 more flaws omitted

@chrisdavidmills
Copy link
Copy Markdown
Contributor

@hamishwillee, as an FYI, I'm working on the Crash Reporting API docs right now.

One thing I am confused about with the docs for the reporting APIs — the dictionary pages are titled xReport, for example, DeprecationReport, but the corresponding API entries in the specs are called xReportBody, for example, DeprecationReportBody. I'm assuming that this is because the ReportingObserver returns report objects that the body objects are contained within, but I really don't get where or how this is specified.

Crash reports are not observed by reporting observers; they are just sent to the server endpoints directly when a crash occurs. This being the case, should I still call the corresponding dictionary page CrashReport rather than CrashReportBody? This stuff is confusing as hell.

I'll get on with it anyway, and produce a draft to look at.

@hamishwillee
Copy link
Copy Markdown
Collaborator Author

Crash reports are not observed by reporting observers; they are just sent to the server endpoints directly when a crash occurs. This being the case, should I still call the corresponding dictionary page CrashReport rather than CrashReportBody? This stuff is confusing as hell.

@chrisdavidmills This has a long and still messy history. The original Reporting API defined Report and ReportBody interfaces, and implementations were supposed to derive from ReportBody. The spec changed a ciouple of years ago to make Report and ReportBody into dictonaries, and updated some of the derived report bodies to match. This is still all a mess where some have been migrated, some have not, and some don't derive from anything at all and therefore have no spec name. Following the suggestion of BCD we agreed to assume that we should document as though everything had migrated.

So the short version is, we document reports as dictionaries. Following MDN practise we don't document intermediate dictionaries, we just document the top level dictionary. Hence the pattern you see were we document the whole derived report and assume nothing is derived. Make sense?

@hamishwillee
Copy link
Copy Markdown
Collaborator Author

Crash reports are not observed by reporting observers; they are just sent to the server endpoints directly when a crash occurs. This being the case, should I still call the corresponding dictionary page CrashReport rather than CrashReportBody? This stuff is confusing as hell.

Yes. You have done it as I would. The point of THIS PR is to list all the reports you might get, and also to track the missing ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reporting: there's no complete list of possible report types (or named reporting endpoints)

3 participants