ElectronMenu.once method
ElectronMenu › once
Unofficial
Registers a one-time event listener that is invoked when a popup is closed either manually or with ElectronMenu.closePopup.Signature:
once(event: "menu-will-close", listener: (event: ElectronEvent) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| event | "menu-will-close" | The event name. |
| listener | (event: ElectronEvent) => void | The event handler. |
Returns: this — This menu instance.
Unofficial
Registers a one-time event listener that is invoked when ElectronMenu.popup is called.Signature:
once(event: "menu-will-show", listener: (event: ElectronEvent) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| event | "menu-will-show" | The event name. |
| listener | (event: ElectronEvent) => void | The event handler. |
Returns: this — This menu instance.