草案
此页面不完整。
只读
id
特性为
ContentIndexEvent
接口是
字符串
which identifies the deleted content index via it's
id
.
var id = ContentIndexEvent.id;
A
字符串
representation of the deleted content index id.
This example listens for the
contentdelete
event and logs the removed content index id.
ContentIndexEvent
is only available to the {domxref('ServiceWorkerGlobalScope','global scope')}} of a
ServiceWorker
.
self.addEventListener('contentdelete', (event) => {
console.log(event.id);
// logs content index id, which can then be used to determine what content to delete from your cache
});
| 规范 | 状态 | 注释 |
|---|---|---|
|
未知
The definition of 'id' in that specification. |
未知 | 初始定义。 |
No compatibility data found. Please contribute data for "api.ContentIndexEvent.id" (depth: 1) to the MDN 兼容性数据存储库 .