COEPViolationReportBody: destination property
Non-standard: This feature is not standardized. We do not recommend using non-standard features in production, as they have limited browser support, and may change or be removed. However, they can be a suitable alternative in specific cases where no standard option exists.
The destination read-only property of the COEPViolationReportBody dictionary indicates the Request.destination of the blocked resource.
Value
A string that can have one of the values of Request.destination.
Examples
>Get the destination of a report
In this example we create a new ReportingObserver to observe COEP violation reports, then log the value of destination to the console.
js
const options = {
types: ["coep"],
buffered: true,
};
const observer = new ReportingObserver((reports, observer) => {
const firstReport = reports[0];
console.log(firstReport.type); // coep
console.log(firstReport.body.destination);
}, options);
Specifications
| Specification |
|---|
| HTML> # embedder-policy-checks> |
| HTML> # coep> |