这是
实验性技术
检查
浏览器兼容性表格
要小心谨慎在生产中使用这之前。
disconnect()
方法在
ReportingObserver
interface stops a reporting observer that had previously started observing from collecting reports.
After calling
disconnect()
, neither
ReportingObserver.takeRecords()
nor the
records
参数为
ReportingObserver()
callback will return any reports. The associated observer will no longer be active.
reportingObserverInstance.disconnect()
let options = {
types: ['deprecation'],
buffered: true
}
let observer = new ReportingObserver(function(reports, observer) {
reportBtn.onclick = () => displayReports(reports);
}, options);
observer.observe()
...
observer.disconnect()
| 规范 | 状态 | 注释 |
|---|---|---|
|
Reporting API
The definition of 'ReportingObserver.disconnect()' in that specification. |
编者草案 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
disconnect
|
Chrome 69 | Edge 79 | Firefox 不支持 No | IE 不支持 No | Opera 56 | Safari 不支持 No | WebView Android 69 | Chrome Android 69 | Firefox Android 不支持 No | Opera Android 48 | Safari iOS 不支持 No | Samsung Internet Android 10.0 |
完整支持
不支持
实验。期望将来行为有所改变。
ReportingObserver
disconnect()
observe()
takeRecords()