ReportingObserver

open class ReportingObserver(callback: ReportingObserverCallback, options: ReportingObserverOptions = definedExternally)(source)

The ReportingObserver interface of the Reporting API allows you to collect and access reports.

MDN Reference

Constructors

Link copied to clipboard
constructor(callback: ReportingObserverCallback, options: ReportingObserverOptions = definedExternally)

Functions

Link copied to clipboard
external fun disconnect()

The disconnect() method of the ReportingObserver interface stops a reporting observer that had previously started observing from collecting reports.

Link copied to clipboard
external fun observe()

The observe() method of the ReportingObserver interface instructs a reporting observer to start collecting reports in its report queue.

Link copied to clipboard
external fun takeRecords(): ReportList

The takeRecords() method of the ReportingObserver interface returns the current list of reports contained in the observer's report queue, and empties the queue.