Reporting API
The ReportingObserver interface of the Reporting API allows you to collect and access reports.
Browser support
| Feature | Desktop | Mobile | ||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Chrome Android | Safari iOS | |
| 69 | 79 | 149 | 16.4 | 69 | 16.4 | |
| The disconnect() method of the ReportingObserver interface stops a reporting observer that had previously started observing from collecting reports. | 69 | 79 | 149 | 16.4 | 69 | 16.4 |
| The observe() method of the ReportingObserver interface instructs a reporting observer to start collecting reports in its report queue. | 69 | 79 | 149 | 16.4 | 69 | 16.4 |
| The ReportingObserver() constructor of the Reporting API creates a new ReportingObserver object instance, which can be used to collect and access reports. | 69 | 79 | 149 | 16.4 | 69 | 16.4 |
ReportingObserver (options parameter) `options` parameter | 69 | 79 | 149 | 16.4 | 69 | 16.4 |
ReportingObserver (options parameter types property) `types_property` property | 69 | 79 | 149 | 16.4 | 69 | 16.4 |
ReportingObserver (options parameter types property coep) `coep` report | 69 | 79 | | | 69 | |
| The CSPViolationReport dictionary of the Reporting API represents a report that is generated when a document violates its Content Security Policy (CSP). | 74 | 79 | 149 | 18.4 | 74 | 18.4 |
| The DeprecationReport dictionary of the Reporting API represents a deprecation report. | 69 | 79 | 149 | | 69 | |
| The IntegrityViolationReport dictionary of the Reporting API represents a report that is generated when a document violates its Integrity Policy. | 138 | 138 | 149 | | 138 | |
| The InterventionReport dictionary of the Reporting API represents an intervention report. | 69 | 79 | | | 69 | |
| The takeRecords() method of the ReportingObserver interface returns the current list of reports contained in the observer's report queue, and empties the queue. | 69 | 79 | 149 | 16.4 | 69 | 16.4 |
worker_support Available in workers | 84 | 84 | 149 | | 84 | |
| Other | ||||||
| The HTTP Reporting-Endpoints response header allows website administrators to specify one or more endpoints that can be sent reports generated by the Reporting API. | 96 | 96 | 149 | 16.4 | 96 | 16.4 |
- This browser only partially implements this feature
- Not supported in workers
Use cases
-
Using Reporting API
The ReportingObserver interface of the Reporting API allows you to collect and access reports.
Cautions
- May not be supported in older browsers.
Implementation notes
- Some APIs require a secure context (HTTPS) or user activation. Check the requirements before use.