BackgroundFetchEvent:registration 属性
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
备注: 此特性仅在 Service Worker 中可用。
BackgroundFetchEvent
接口的只读属性 registration
返回一个 BackgroundFetchRegistration
对象。
值
示例
在此示例中,如果用户单击显示下载进度的用户界面,则会触发 backgroundfetchclick
事件。通过调用 event.registration
返回当前的 BackgroundFetchRegistration
。
js
addEventListener("backgroundfetchclick", (event) => {
console.log(event.registration);
});
规范
Specification |
---|
Background Fetch> # dom-backgroundfetchevent-registration> |
浏览器兼容性
Loading…