Note: This feature is available in Web Workers.
The observe() method of the ReportingObserver interface instructs a reporting observer to start collecting reports in its report queue.
observe()None.
None (undefined).
const options = {
types: ["deprecation"],
buffered: true,
};
const observer = new ReportingObserver((reports, observer) => {
reportBtn.onclick = () => displayReports(reports);
}, options);
observer.observe();