Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Note: This feature is only available in Service Workers.
The ContentIndexEvent() constructor creates a new ContentIndexEvent object whose type and other options are configured as specified.
new ContentIndexEvent(type, options)typeA string with the name of the event. It is case-sensitive and browsers always set it to contentdelete.
optionsAn object that, in addition of the properties defined in ExtendableEvent(), has the following properties:
idThe id of the indexed content you want the ContentIndex object to remove.
A new ContentIndexEvent object configured using the given options.
This examples constructs a new ContentIndexEvent with the relevant id.
const removeData = {
id: "unique-content-id",
};
const ciEvent = new ContentIndexEvent("contentdelete", removeData);
ciEvent.id; // should return 'unique-content-id'