值
一个字符串,表示生成该报告的文档的 URL。
示例
js
const options = {
types: ["deprecation"],
buffered: true,
};
const observer = new ReportingObserver(([firstReport], observer) => {
// Log the URL of the document that generated the first report
// e.g. "https://www.example.com/cats.html"
console.log(firstReport.url);
}, options);
规范
| 规范 |
|---|
| Reporting API # dom-report-url |
浏览器兼容性
加载中…