这是 实验性技术
检查 浏览器兼容性表格 要小心谨慎在生产中使用这之前。

ReportingObserverOptions dictionary of the Reporting API allows options to be set in the constructor when creating a ReportingObserver .

特性

类型
An array of strings representing the types of report to be collected by this observer. Available types include deprecation , intervention ,和 crash .
buffered
A boolean that defines whether the reports that were generated before the observer was able to be created should be observable ( true ) 或不 ( false ).

范例

let options = {
  types: ['deprecation'],
  buffered: true
}
let observer = new ReportingObserver(function(reports, observer) {
  reportBtn.onclick = () => displayReports(reports);
}, options);
					

规范

规范 状态 注释
Reporting API
The definition of 'ReportingObserverOptions' in that specification.
编者草案

浏览器兼容性

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.

No compatibility data found. Please contribute data for "api.ReportingObserverOptions" (depth: 1) to the MDN 兼容性数据存储库 .

另请参阅

元数据

  • 最后修改: