ElectronBrowserWindow.once method
ElectronBrowserWindow › once
Unofficial
Registers a one-time listener for the given window event.Signature:
once($event: "always-on-top-changed", listener: ($event: ElectronEvent, isAlwaysOnTop: boolean) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "always-on-top-changed" | |
| listener | ($event: ElectronEvent, isAlwaysOnTop: boolean) => void | The event handler. |
Returns: this — This BrowserWindow instance.
Unofficial
Signature:
once($event: "app-command", listener: ($event: ElectronEvent, command: string) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "app-command" | |
| listener | ($event: ElectronEvent, command: string) => void |
Returns: this
Unofficial
Signature:
once($event: "blur", listener: (...args: unknown[]) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "blur" | |
| listener | (...args: unknown[]) => void |
Returns: this
Unofficial
Signature:
once($event: "close", listener: ($event: ElectronEvent) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "close" | |
| listener | ($event: ElectronEvent) => void |
Returns: this
Unofficial
Signature:
once($event: "closed", listener: (...args: unknown[]) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "closed" | |
| listener | (...args: unknown[]) => void |
Returns: this
Unofficial
Signature:
once($event: "enter-full-screen", listener: (...args: unknown[]) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "enter-full-screen" | |
| listener | (...args: unknown[]) => void |
Returns: this
Unofficial
Signature:
once($event: "enter-html-full-screen", listener: (...args: unknown[]) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "enter-html-full-screen" | |
| listener | (...args: unknown[]) => void |
Returns: this
Unofficial
Signature:
once($event: "focus", listener: (...args: unknown[]) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "focus" | |
| listener | (...args: unknown[]) => void |
Returns: this
Unofficial
Signature:
once($event: "hide", listener: (...args: unknown[]) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "hide" | |
| listener | (...args: unknown[]) => void |
Returns: this
Unofficial
Signature:
once($event: "leave-full-screen", listener: (...args: unknown[]) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "leave-full-screen" | |
| listener | (...args: unknown[]) => void |
Returns: this
Unofficial
Signature:
once($event: "leave-html-full-screen", listener: (...args: unknown[]) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "leave-html-full-screen" | |
| listener | (...args: unknown[]) => void |
Returns: this
Unofficial
Signature:
once($event: "maximize", listener: (...args: unknown[]) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "maximize" | |
| listener | (...args: unknown[]) => void |
Returns: this
Unofficial
Signature:
once($event: "minimize", listener: (...args: unknown[]) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "minimize" | |
| listener | (...args: unknown[]) => void |
Returns: this
Unofficial
Signature:
once($event: "move", listener: (...args: unknown[]) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "move" | |
| listener | (...args: unknown[]) => void |
Returns: this
Unofficial
Signature:
once($event: "moved", listener: (...args: unknown[]) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "moved" | |
| listener | (...args: unknown[]) => void |
Returns: this
Unofficial
Signature:
once($event: "new-window-for-tab", listener: (...args: unknown[]) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "new-window-for-tab" | |
| listener | (...args: unknown[]) => void |
Returns: this
Unofficial
Signature:
once($event: "page-title-updated", listener: ($event: ElectronEvent, title: string, explicitSet: boolean) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "page-title-updated" | |
| listener | ($event: ElectronEvent, title: string, explicitSet: boolean) => void |
Returns: this
Unofficial
Signature:
once($event: "ready-to-show", listener: (...args: unknown[]) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "ready-to-show" | |
| listener | (...args: unknown[]) => void |
Returns: this
Unofficial
Signature:
once($event: "resize", listener: (...args: unknown[]) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "resize" | |
| listener | (...args: unknown[]) => void |
Returns: this
Unofficial
Signature:
once($event: "resized", listener: (...args: unknown[]) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "resized" | |
| listener | (...args: unknown[]) => void |
Returns: this
Unofficial
Signature:
once($event: "responsive", listener: (...args: unknown[]) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "responsive" | |
| listener | (...args: unknown[]) => void |
Returns: this
Unofficial
Signature:
once($event: "restore", listener: (...args: unknown[]) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "restore" | |
| listener | (...args: unknown[]) => void |
Returns: this
Unofficial
Signature:
once($event: "rotate-gesture", listener: ($event: ElectronEvent, rotation: number) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "rotate-gesture" | |
| listener | ($event: ElectronEvent, rotation: number) => void |
Returns: this
Unofficial
Signature:
once($event: "scroll-touch-begin", listener: (...args: unknown[]) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "scroll-touch-begin" | |
| listener | (...args: unknown[]) => void |
Returns: this
Unofficial
Signature:
once($event: "scroll-touch-edge", listener: (...args: unknown[]) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "scroll-touch-edge" | |
| listener | (...args: unknown[]) => void |
Returns: this
Unofficial
Signature:
once($event: "scroll-touch-end", listener: (...args: unknown[]) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "scroll-touch-end" | |
| listener | (...args: unknown[]) => void |
Returns: this
Unofficial
Signature:
once($event: "session-end", listener: (...args: unknown[]) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "session-end" | |
| listener | (...args: unknown[]) => void |
Returns: this
Unofficial
Signature:
once($event: "sheet-begin", listener: (...args: unknown[]) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "sheet-begin" | |
| listener | (...args: unknown[]) => void |
Returns: this
Unofficial
Signature:
once($event: "sheet-end", listener: (...args: unknown[]) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "sheet-end" | |
| listener | (...args: unknown[]) => void |
Returns: this
Unofficial
Signature:
once($event: "show", listener: (...args: unknown[]) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "show" | |
| listener | (...args: unknown[]) => void |
Returns: this
Unofficial
Signature:
once($event: "swipe", listener: ($event: ElectronEvent, direction: string) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "swipe" | |
| listener | ($event: ElectronEvent, direction: string) => void |
Returns: this
Unofficial
Signature:
once($event: "system-context-menu", listener: ($event: ElectronEvent, point: ElectronPoint) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "system-context-menu" | |
| listener | ($event: ElectronEvent, point: ElectronPoint) => void |
Returns: this
Unofficial
Signature:
once($event: "unmaximize", listener: (...args: unknown[]) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "unmaximize" | |
| listener | (...args: unknown[]) => void |
Returns: this
Unofficial
Signature:
once($event: "unresponsive", listener: (...args: unknown[]) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "unresponsive" | |
| listener | (...args: unknown[]) => void |
Returns: this
Unofficial
Signature:
once($event: "will-move", listener: ($event: ElectronEvent, newBounds: ElectronRectangle) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "will-move" | |
| listener | ($event: ElectronEvent, newBounds: ElectronRectangle) => void |
Returns: this
Unofficial
Signature:
once($event: "will-resize", listener: ($event: ElectronEvent, newBounds: ElectronRectangle, details: ElectronWillResizeDetails) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "will-resize" | |
| listener | ($event: ElectronEvent, newBounds: ElectronRectangle, details: ElectronWillResizeDetails) => void |
Returns: this