This is done by checking the channel associatedBrowsingContext in NetworkUtils matchRequest function. A test is added to make sure Reporting API requests are visible in the Netmonitor and that we can inspect their payload. Depends on D283896 Differential Revision: https://phabricator.services.mozilla.com/D284675
23 lines
439 B
HTML
23 lines
439 B
HTML
<html>
|
|
<head>
|
|
<meta charset=utf8>
|
|
<script>
|
|
"use strict";
|
|
|
|
// Set up reporting observer
|
|
const options = {
|
|
types: ['deprecation'],
|
|
buffered: true
|
|
}
|
|
|
|
const observer = new ReportingObserver(function(reports) {
|
|
console.log("Reporting API reports", reports)
|
|
}, options);
|
|
observer.observe();
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<h1>Reporting API</h1>
|
|
</body>
|
|
</html>
|