Skip to content

ElectronCookies.on('changed') method

ElectronCookies › on(‘changed’)

Unofficial

Registers a listener for the changed event, emitted when a cookie is added, edited, removed, or expired.

Signature:

on(event: "changed", listener: (event: ElectronEvent, cookie: ElectronCookie, cause: "evicted" | "expired-overwrite" | "expired" | "explicit" | "overwrite", removed: boolean) => void): this

Parameters:

Parameter Type Description
event "changed" The event name.
listener (event: ElectronEvent, cookie: ElectronCookie, cause: "evicted" | "expired-overwrite" | "expired" | "explicit" | "overwrite", removed: boolean) => void Called with the changed cookie, the cause of the change, and whether it was removed.

Returns: thisThis cookies instance.