ContentIndexEvent: ContentIndexEvent() constructor
The ContentIndexEvent()
constructor creates a new ContentIndexEvent
object whose type and other options are configured as specified.
Syntax
new ContentIndexEvent(type, options)
Parameters
-
type
-
A string with the name of the event. It is case-sensitive and browsers always set it to contentdelete
.
-
options
-
An object that, in addition of the properties defined in ExtendableEvent()
, has the following properties:
-
id
-
The id of the indexed content you want the ContentIndex
object to remove.
Return value
A new ContentIndexEvent
object configured using the given options.
Examples
This examples constructs a new ContentIndexEvent
with the relevant id.
const removeData = {
id: "unique-content-id",
};
const ciEvent = new ContentIndexEvent("contentdelete", removeData);
ciEvent.id;
Specifications
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