Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. ReportBody

ReportBody

Note: This feature is available inWeb Workers.

TheReportBody interface of theReporting API represents the body of a report. Individual report types inherit from this interface, adding specific attributes relevant to the particular report.

The following interfaces inherit fromReportBody:

An instance ofReportBody is returned as the value ofReport.body. The interface has no constructor.

Instance methods

ReportBody.toJSON()Deprecated

Aserializer which returns a JSON representation of theReportBody object.

Examples

In this example we create a newReportingObserver to observe intervention reports. TheInterventionReportBody interface inherits fromReportBody.

js
const options = {  types: ["intervention"],  buffered: true,};const observer = new ReportingObserver(([firstReport], observer) => {  console.log(firstReport.type); // intervention}, options);

Specifications

Specification
Reporting API
# reportbody

Browser compatibility

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp