ServiceWorkerGlobalScope:cookiechange 事件
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
备注: 此特性仅在 Service Worker 中可用。
ServiceWorkerGlobalScope
接口的 cookiechange
事件会在与 Service Worker 的 cookie 更改订阅列表相匹配的 cookie 发生更改时触发。
此事件不可取消且不会冒泡。
语法
在类似 addEventListener()
这样方法中使用事件名称,或设置事件处理器属性。
js
addEventListener("cookiechange", (event) => {});
oncookiechange = (event) => {};
事件类型
规范
Specification |
---|
Cookie Store API # dom-serviceworkerglobalscope-oncookiechange |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
cookiechange event |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- Experimental. Expect behavior to change in the future.
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.