Skip to content

ElectronCookies.once method

ElectronCookies › once

Unofficial

Registers a one-time listener for the changed event.

Signature:

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

Parameters:

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

Returns: thisThis cookies instance.