ContentIndexEvent()
Draft: This page is not complete.
The ContentIndexEvent() constructor creates a new ContentIndexEvent object whose type and other options are configured as specified.
Syntax
var ContentIndexEvent = new ContentIndexEvent(type, ContentIndexEventInit);
Parameters
- type
-
A
DOMStringindicating the event which occurred. ForContentIndexEvent, this is alwaysdelete. - eventInitDict Optional
-
An options object containing any initialization data you want to populate the
ContentIndexEventobject with. The options are:-
id: The id of the indexed content you want theContentIndexEventto remove.
-
Return value
A ContentIndexEvent object configured using the given inputs.
Examples
This examples constructs a new ContentIndexEvent with the relevant id.
var removeData = { id : 'unique-content-id' } var ciEvent = new ContentIndexEvent('contentdelete', removeData); ciEvent.id; // should return 'unique-content-id'
Specifications
| Specification |
|---|
| Content Index # content-index-event |
Browser compatibility
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
ContentIndexEvent |
No |
No |
No |
No |
No |
No |
84 |
84 |
No |
60 |
No |
14.0 |
See also
- An introductory article on the Content Index API
- An app which uses the Content Index API to list and remove 'save for later' content
- Service Worker API, along with information about Cache and CacheStorage
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/ContentIndexEvent/ContentIndexEvent