← Back to release summary

Expose Reporting API interfaces to JavaScript

Category
Miscellaneous
Type
No developer-visible change
Status
No active development (Chrome No active development)
Intent stage
Prepare to ship

WPT details: IDLHarness tests already exist in Web Platform Tests for these interfaces, as they follow the published specification. This change causes those tests to pass.

Summary

Several interface objects used by the Reporting API were originally not exposed as symbols on the JavaScript global object. This includes Report, ReportBody, and the various specific report body types such as CSPViolationReportBody and DeprecationReportBody. This change exposes those objects on the window (or worker global), bringing the implementation in line with the specification.

Motivation

WebIDL is deprecating the NoInterfaceObject attribute, and APIs are moving towards having interface objects exposed on the global object ('window' or 'self') This can allow for some kinds of feature detection, but mostly it just brings Chrome's ReportingObserver in line with the specificaion.

Standards & signals

Ecosystem

View on chromestatus.com