Classes
NativeWindow
A window surface that hosts a NativeScript view tree. Wraps a platform window (iOS UIWindowScene + UIWindow, Android Activity) and owns the per-window root v...
Defined in: native-window/index.d.ts:266
A window surface that hosts a NativeScript view tree.
Wraps a platform window (iOS UIWindowScene + UIWindow, Android Activity) and owns the per-window root view, its CSS classes and its lifecycle events. Instances are created by the framework as the platform connects surfaces; reach them through Application.activeWindow, Application.primaryWindow, Application.getWindows() or Application.getWindowById(), and use ios / android to get at the native objects.
Extends
Constructors
Constructor
new NativeWindow(): NativeWindow;Returns
NativeWindow
Inherited from
Properties
android?
readonly optional android?: {
activity: AppCompatActivity;
};Defined in: native-window/index.d.ts:71
The Android surface backing this window, or undefined when not running on Android or when the activity is already gone.
activity
readonly activity: AppCompatActivity;Inherited from
id
readonly id: string;Defined in: native-window/index.d.ts:41
Stable identifier of this window, unique for the lifetime of the JS context. Survives a detach/re-attach, so it can be used to correlate a window across an iOS scene reconnect or an Android activity recreation.
Inherited from
ios?
readonly optional ios?: {
scene?: UIWindowScene;
uiWindow: UIWindow;
};Defined in: native-window/index.d.ts:65
The iOS surface backing this window, or undefined when not running on iOS. scene is absent for apps still on the pre-scene (window-only) lifecycle.
scene?
readonly optional scene?: UIWindowScene;uiWindow
readonly uiWindow: UIWindow;Inherited from
isPrimary
readonly isPrimary: boolean;Defined in: native-window/index.d.ts:59
Whether this is the application's primary window.
At most one window is primary at a time. When the primary window closes another attached window is promoted and primaryWindowChanged is raised on the Application.
Inherited from
role
readonly role: WindowRole;Defined in: native-window/index.d.ts:46
The purpose this window surface serves.
Inherited from
rootView
readonly rootView: View;Defined in: native-window/index.d.ts:270
The root view currently hosted by this window, if any.
state
readonly state: WindowState;Defined in: native-window/index.d.ts:51
Where this window currently sits in its lifecycle.
Inherited from
propertyChangeEvent
static propertyChangeEvent: string;Defined in: data/observable/index.ts
String value used when hooking to propertyChange event.
Ns Event
propertyChange
Inherited from
WindowBase.propertyChangeEvent
Methods
_createPropertyChangeData()
_createPropertyChangeData(
propertyName: string,
value: any,
oldValue?: any): PropertyChangeData;Defined in: data/observable/index.ts
This method is intended to be overriden by inheritors to provide additional implementation.
Parameters
| Parameter | Type |
|---|---|
propertyName | string |
value | any |
oldValue? | any |
Returns
Inherited from
WindowBase._createPropertyChangeData
_emit()
_emit(eventName: string): void;Defined in: data/observable/index.ts
Parameters
| Parameter | Type |
|---|---|
eventName | string |
Returns
void
Inherited from
addEventListener()
addEventListener(
eventName: string,
callback: (data: EventData) => void,
thisArg?: any,
once?: boolean): void;Defined in: data/observable/index.ts
Adds a listener for the specified event name.
Parameters
| Parameter | Type | Description |
|---|---|---|
eventName | string | Name of the event to attach to. |
callback | (data: EventData) => void | A function to be called when some of the specified event(s) is raised. |
thisArg? | any | An optional parameter which when set will be used as "this" in callback method call. |
once? | boolean | An optional parameter which when set will cause the event listener to fire once. |
Returns
void
Inherited from
close()
abstract close(): void;Defined in: native-window/index.d.ts:79
Closes this window.
Ends the window session: the native surface is dismissed, close is raised and the window is dropped from the Application registry.
Returns
void
Inherited from
get()
get(name: string): any;Defined in: data/observable/index.ts
Gets the value of the specified property.
Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
any
Inherited from
hasListeners()
hasListeners(eventName: string): boolean;Defined in: data/observable/index.ts
Checks whether a listener is registered for the specified event name.
Parameters
| Parameter | Type | Description |
|---|---|---|
eventName | string | The name of the event to check for. |
Returns
boolean
Inherited from
layoutDirection()
layoutDirection(): LayoutDirectionType;Defined in: native-window/index.d.ts:310
The current layout direction of this window.
Read from the native surface while the window is attached; a detached window reports the last value it saw. A read that catches a change the platform has not reported yet also raises layoutDirectionChanged, so a change is never swallowed by the reading.
Returns
notify()
notify<T>(data: T): void;Defined in: data/observable/index.ts
Notify this Observable instance with some data. This causes all event handlers on the Observable instance to be called, as well as any 'global' event handlers set on the instance's class.
Type Parameters
| Type Parameter |
|---|
T extends Optional<EventData, "object"> |
Parameters
| Parameter | Type | Description |
|---|---|---|
data | T | an object that satisfies the EventData interface, though with an optional 'object' property. If left undefined, the 'object' property will implicitly be set as this Observable instance. |
Returns
void
Inherited from
notifyPropertyChange()
notifyPropertyChange(
name: string,
value: any,
oldValue?: any): void;Defined in: data/observable/index.ts
Notifies all the registered listeners for the property change event.
Parameters
| Parameter | Type |
|---|---|
name | string |
value | any |
oldValue? | any |
Returns
void
Inherited from
WindowBase.notifyPropertyChange
off()
Call Signature
off(
event: "contentLoaded",
callback?: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:393
Removes the listener(s) for the specified event name.
Parameters
| Parameter | Type | Description |
|---|---|---|
event | "contentLoaded" | - |
callback? | (data: NativeWindowEventData) => void | An optional specific event listener to remove (if omitted, all event listeners by this name will be removed). |
thisArg? | any | An optional parameter which, when set, will be used to refine search of the correct event listener to be removed. |
Returns
void
Overrides
Call Signature
off(
event: "activate",
callback?: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:394
Parameters
| Parameter | Type |
|---|---|
event | "activate" |
callback? | (data: NativeWindowEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "deactivate",
callback?: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:395
Parameters
| Parameter | Type |
|---|---|
event | "deactivate" |
callback? | (data: NativeWindowEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "background",
callback?: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:396
Parameters
| Parameter | Type |
|---|---|
event | "background" |
callback? | (data: NativeWindowEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "foreground",
callback?: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:397
Parameters
| Parameter | Type |
|---|---|
event | "foreground" |
callback? | (data: NativeWindowEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "attached",
callback?: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:398
Parameters
| Parameter | Type |
|---|---|
event | "attached" |
callback? | (data: NativeWindowEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "detached",
callback?: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:399
Parameters
| Parameter | Type |
|---|---|
event | "detached" |
callback? | (data: NativeWindowEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "close",
callback?: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:400
Parameters
| Parameter | Type |
|---|---|
event | "close" |
callback? | (data: NativeWindowEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "displayed",
callback?: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:401
Parameters
| Parameter | Type |
|---|---|
event | "displayed" |
callback? | (data: NativeWindowEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "orientationChanged",
callback?: (data: WindowOrientationChangedEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:402
Parameters
| Parameter | Type |
|---|---|
event | "orientationChanged" |
callback? | (data: WindowOrientationChangedEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "systemAppearanceChanged",
callback?: (data: WindowSystemAppearanceChangedEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:403
Parameters
| Parameter | Type |
|---|---|
event | "systemAppearanceChanged" |
callback? | (data: WindowSystemAppearanceChangedEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "layoutDirectionChanged",
callback?: (data: WindowLayoutDirectionChangedEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:404
Parameters
| Parameter | Type |
|---|---|
event | "layoutDirectionChanged" |
callback? | (data: WindowLayoutDirectionChangedEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "activityCreated",
callback?: (args: AndroidActivityBundleEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:405
Parameters
| Parameter | Type |
|---|---|
event | "activityCreated" |
callback? | (args: AndroidActivityBundleEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "activityDestroyed",
callback?: (args: AndroidActivityEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:406
Parameters
| Parameter | Type |
|---|---|
event | "activityDestroyed" |
callback? | (args: AndroidActivityEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "activityStarted",
callback?: (args: AndroidActivityEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:407
Parameters
| Parameter | Type |
|---|---|
event | "activityStarted" |
callback? | (args: AndroidActivityEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "activityPaused",
callback?: (args: AndroidActivityEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:408
Parameters
| Parameter | Type |
|---|---|
event | "activityPaused" |
callback? | (args: AndroidActivityEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "activityResumed",
callback?: (args: AndroidActivityEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:409
Parameters
| Parameter | Type |
|---|---|
event | "activityResumed" |
callback? | (args: AndroidActivityEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "activityStopped",
callback?: (args: AndroidActivityEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:410
Parameters
| Parameter | Type |
|---|---|
event | "activityStopped" |
callback? | (args: AndroidActivityEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "saveActivityState",
callback?: (args: AndroidActivityBundleEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:411
Parameters
| Parameter | Type |
|---|---|
event | "saveActivityState" |
callback? | (args: AndroidActivityBundleEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "activityResult",
callback?: (args: AndroidActivityResultEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:412
Parameters
| Parameter | Type |
|---|---|
event | "activityResult" |
callback? | (args: AndroidActivityResultEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "activityBackPressed",
callback?: (args: AndroidActivityBackPressedEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:413
Parameters
| Parameter | Type |
|---|---|
event | "activityBackPressed" |
callback? | (args: AndroidActivityBackPressedEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "activityNewIntent",
callback?: (args: AndroidActivityNewIntentEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:414
Parameters
| Parameter | Type |
|---|---|
event | "activityNewIntent" |
callback? | (args: AndroidActivityNewIntentEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "activityRequestPermissions",
callback?: (args: AndroidActivityRequestPermissionsEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:415
Parameters
| Parameter | Type |
|---|---|
event | "activityRequestPermissions" |
callback? | (args: AndroidActivityRequestPermissionsEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "sceneWillConnect",
callback?: (args: SceneEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:416
Parameters
| Parameter | Type |
|---|---|
event | "sceneWillConnect" |
callback? | (args: SceneEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "sceneDidActivate",
callback?: (args: SceneEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:417
Parameters
| Parameter | Type |
|---|---|
event | "sceneDidActivate" |
callback? | (args: SceneEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "sceneWillResignActive",
callback?: (args: SceneEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:418
Parameters
| Parameter | Type |
|---|---|
event | "sceneWillResignActive" |
callback? | (args: SceneEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "sceneWillEnterForeground",
callback?: (args: SceneEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:419
Parameters
| Parameter | Type |
|---|---|
event | "sceneWillEnterForeground" |
callback? | (args: SceneEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "sceneDidEnterBackground",
callback?: (args: SceneEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:420
Parameters
| Parameter | Type |
|---|---|
event | "sceneDidEnterBackground" |
callback? | (args: SceneEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "sceneDidDisconnect",
callback?: (args: SceneEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:421
Parameters
| Parameter | Type |
|---|---|
event | "sceneDidDisconnect" |
callback? | (args: SceneEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "sceneOpenURLContexts",
callback?: (args: SceneOpenURLContextsEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:422
Parameters
| Parameter | Type |
|---|---|
event | "sceneOpenURLContexts" |
callback? | (args: SceneOpenURLContextsEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "sceneContinueUserActivity",
callback?: (args: SceneContinueUserActivityEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:423
Parameters
| Parameter | Type |
|---|---|
event | "sceneContinueUserActivity" |
callback? | (args: SceneContinueUserActivityEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
event: "scenePerformActionForShortcutItem",
callback?: (args: ScenePerformActionForShortcutItemEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:424
Removes a listener for the specified event name. Omitting the callback removes every listener registered for that event on this window.
Parameters
| Parameter | Type |
|---|---|
event | "scenePerformActionForShortcutItem" |
callback? | (args: ScenePerformActionForShortcutItemEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
off(
eventName: string,
callback?: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:425
Parameters
| Parameter | Type |
|---|---|
eventName | string |
callback? | (data: NativeWindowEventData) => void |
thisArg? | any |
Returns
void
Overrides
WindowBase.offon()
Call Signature
on(
event: "contentLoaded",
callback: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:321
Raised when the root view content of this window is set or changed.
Bringing a window up follows a fixed order that app code can rely on: Application ready -> Application windowOpen -> the raw platform connect/create event (sceneWillConnect / activityCreated) -> content resolution (the window content resolver, or the legacy launch bridge for the first window) -> contentLoaded -> activate and displayed.
Parameters
| Parameter | Type |
|---|---|
event | "contentLoaded" |
callback | (data: NativeWindowEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "activate",
callback: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:326
Raised when the window loses focus.
Parameters
| Parameter | Type |
|---|---|
event | "activate" |
callback | (data: NativeWindowEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "deactivate",
callback: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:327
Raised when the window enters the background.
Parameters
| Parameter | Type |
|---|---|
event | "deactivate" |
callback | (data: NativeWindowEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "background",
callback: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:328
Raised when the window enters the foreground.
Parameters
| Parameter | Type |
|---|---|
event | "background" |
callback | (data: NativeWindowEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "foreground",
callback: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:329
Raised when a native surface is bound to the window - both on the first connect and on every re-attach after a detached.
Parameters
| Parameter | Type |
|---|---|
event | "foreground" |
callback | (data: NativeWindowEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "attached",
callback: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:330
Raised when the native surface goes away while the window session stays alive (iOS scene disconnect, Android activity recreation).
The window stays registered on the Application and keeps its listeners, so the same instance is handed back when a surface re-attaches and handlers registered before the detach keep working afterwards.
Parameters
| Parameter | Type |
|---|---|
event | "attached" |
callback | (data: NativeWindowEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "detached",
callback: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:331
Raised when the window session ends for good.
Fires exactly once per window. Listeners stay registered for the whole teardown, so a handler added at any earlier point still observes it; immediately after it is dispatched the framework drops every listener on the instance, so nothing registered on a window outlives the window.
Parameters
| Parameter | Type |
|---|---|
event | "detached" |
callback | (data: NativeWindowEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "close",
callback: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:332
Raised after the window content has been displayed for the first time.
Parameters
| Parameter | Type |
|---|---|
event | "close" |
callback | (data: NativeWindowEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "displayed",
callback: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:333
Raised when the orientation of this window changes.
Parameters
| Parameter | Type |
|---|---|
event | "displayed" |
callback | (data: NativeWindowEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "orientationChanged",
callback: (data: WindowOrientationChangedEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:334
Raised when the system appearance of this window changes between light and dark.
Parameters
| Parameter | Type |
|---|---|
event | "orientationChanged" |
callback | (data: WindowOrientationChangedEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "systemAppearanceChanged",
callback: (data: WindowSystemAppearanceChangedEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:335
Raised when the layout direction of this window changes between ltr and rtl.
Parameters
| Parameter | Type |
|---|---|
event | "systemAppearanceChanged" |
callback | (data: WindowSystemAppearanceChangedEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "layoutDirectionChanged",
callback: (data: WindowLayoutDirectionChangedEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:336
Raised when the root view content of this window is set or changed.
Bringing a window up follows a fixed order that app code can rely on: Application ready -> Application windowOpen -> the raw platform connect/create event (sceneWillConnect / activityCreated) -> content resolution (the window content resolver, or the legacy launch bridge for the first window) -> contentLoaded -> activate and displayed.
Parameters
| Parameter | Type |
|---|---|
event | "layoutDirectionChanged" |
callback | (data: WindowLayoutDirectionChangedEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "activityCreated",
callback: (args: AndroidActivityBundleEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:337
Raised when the root view content of this window is set or changed.
Bringing a window up follows a fixed order that app code can rely on: Application ready -> Application windowOpen -> the raw platform connect/create event (sceneWillConnect / activityCreated) -> content resolution (the window content resolver, or the legacy launch bridge for the first window) -> contentLoaded -> activate and displayed.
Parameters
| Parameter | Type |
|---|---|
event | "activityCreated" |
callback | (args: AndroidActivityBundleEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "activityDestroyed",
callback: (args: AndroidActivityEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:338
Raised when the root view content of this window is set or changed.
Bringing a window up follows a fixed order that app code can rely on: Application ready -> Application windowOpen -> the raw platform connect/create event (sceneWillConnect / activityCreated) -> content resolution (the window content resolver, or the legacy launch bridge for the first window) -> contentLoaded -> activate and displayed.
Parameters
| Parameter | Type |
|---|---|
event | "activityDestroyed" |
callback | (args: AndroidActivityEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "activityStarted",
callback: (args: AndroidActivityEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:339
Raised when the root view content of this window is set or changed.
Bringing a window up follows a fixed order that app code can rely on: Application ready -> Application windowOpen -> the raw platform connect/create event (sceneWillConnect / activityCreated) -> content resolution (the window content resolver, or the legacy launch bridge for the first window) -> contentLoaded -> activate and displayed.
Parameters
| Parameter | Type |
|---|---|
event | "activityStarted" |
callback | (args: AndroidActivityEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "activityPaused",
callback: (args: AndroidActivityEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:340
Raised when the root view content of this window is set or changed.
Bringing a window up follows a fixed order that app code can rely on: Application ready -> Application windowOpen -> the raw platform connect/create event (sceneWillConnect / activityCreated) -> content resolution (the window content resolver, or the legacy launch bridge for the first window) -> contentLoaded -> activate and displayed.
Parameters
| Parameter | Type |
|---|---|
event | "activityPaused" |
callback | (args: AndroidActivityEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "activityResumed",
callback: (args: AndroidActivityEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:341
Raised when the root view content of this window is set or changed.
Bringing a window up follows a fixed order that app code can rely on: Application ready -> Application windowOpen -> the raw platform connect/create event (sceneWillConnect / activityCreated) -> content resolution (the window content resolver, or the legacy launch bridge for the first window) -> contentLoaded -> activate and displayed.
Parameters
| Parameter | Type |
|---|---|
event | "activityResumed" |
callback | (args: AndroidActivityEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "activityStopped",
callback: (args: AndroidActivityEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:342
Raised when the root view content of this window is set or changed.
Bringing a window up follows a fixed order that app code can rely on: Application ready -> Application windowOpen -> the raw platform connect/create event (sceneWillConnect / activityCreated) -> content resolution (the window content resolver, or the legacy launch bridge for the first window) -> contentLoaded -> activate and displayed.
Parameters
| Parameter | Type |
|---|---|
event | "activityStopped" |
callback | (args: AndroidActivityEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "saveActivityState",
callback: (args: AndroidActivityBundleEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:343
Raised when the root view content of this window is set or changed.
Bringing a window up follows a fixed order that app code can rely on: Application ready -> Application windowOpen -> the raw platform connect/create event (sceneWillConnect / activityCreated) -> content resolution (the window content resolver, or the legacy launch bridge for the first window) -> contentLoaded -> activate and displayed.
Parameters
| Parameter | Type |
|---|---|
event | "saveActivityState" |
callback | (args: AndroidActivityBundleEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "activityResult",
callback: (args: AndroidActivityResultEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:344
Raised when the root view content of this window is set or changed.
Bringing a window up follows a fixed order that app code can rely on: Application ready -> Application windowOpen -> the raw platform connect/create event (sceneWillConnect / activityCreated) -> content resolution (the window content resolver, or the legacy launch bridge for the first window) -> contentLoaded -> activate and displayed.
Parameters
| Parameter | Type |
|---|---|
event | "activityResult" |
callback | (args: AndroidActivityResultEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "activityBackPressed",
callback: (args: AndroidActivityBackPressedEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:345
Raised when the root view content of this window is set or changed.
Bringing a window up follows a fixed order that app code can rely on: Application ready -> Application windowOpen -> the raw platform connect/create event (sceneWillConnect / activityCreated) -> content resolution (the window content resolver, or the legacy launch bridge for the first window) -> contentLoaded -> activate and displayed.
Parameters
| Parameter | Type |
|---|---|
event | "activityBackPressed" |
callback | (args: AndroidActivityBackPressedEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "activityNewIntent",
callback: (args: AndroidActivityNewIntentEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:346
Raised when the root view content of this window is set or changed.
Bringing a window up follows a fixed order that app code can rely on: Application ready -> Application windowOpen -> the raw platform connect/create event (sceneWillConnect / activityCreated) -> content resolution (the window content resolver, or the legacy launch bridge for the first window) -> contentLoaded -> activate and displayed.
Parameters
| Parameter | Type |
|---|---|
event | "activityNewIntent" |
callback | (args: AndroidActivityNewIntentEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "activityRequestPermissions",
callback: (args: AndroidActivityRequestPermissionsEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:347
Raised when the root view content of this window is set or changed.
Bringing a window up follows a fixed order that app code can rely on: Application ready -> Application windowOpen -> the raw platform connect/create event (sceneWillConnect / activityCreated) -> content resolution (the window content resolver, or the legacy launch bridge for the first window) -> contentLoaded -> activate and displayed.
Parameters
| Parameter | Type |
|---|---|
event | "activityRequestPermissions" |
callback | (args: AndroidActivityRequestPermissionsEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "sceneWillConnect",
callback: (args: SceneEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:348
Raised when the root view content of this window is set or changed.
Bringing a window up follows a fixed order that app code can rely on: Application ready -> Application windowOpen -> the raw platform connect/create event (sceneWillConnect / activityCreated) -> content resolution (the window content resolver, or the legacy launch bridge for the first window) -> contentLoaded -> activate and displayed.
Parameters
| Parameter | Type |
|---|---|
event | "sceneWillConnect" |
callback | (args: SceneEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "sceneDidActivate",
callback: (args: SceneEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:349
Raised when the root view content of this window is set or changed.
Bringing a window up follows a fixed order that app code can rely on: Application ready -> Application windowOpen -> the raw platform connect/create event (sceneWillConnect / activityCreated) -> content resolution (the window content resolver, or the legacy launch bridge for the first window) -> contentLoaded -> activate and displayed.
Parameters
| Parameter | Type |
|---|---|
event | "sceneDidActivate" |
callback | (args: SceneEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "sceneWillResignActive",
callback: (args: SceneEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:350
Raised when the root view content of this window is set or changed.
Bringing a window up follows a fixed order that app code can rely on: Application ready -> Application windowOpen -> the raw platform connect/create event (sceneWillConnect / activityCreated) -> content resolution (the window content resolver, or the legacy launch bridge for the first window) -> contentLoaded -> activate and displayed.
Parameters
| Parameter | Type |
|---|---|
event | "sceneWillResignActive" |
callback | (args: SceneEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "sceneWillEnterForeground",
callback: (args: SceneEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:351
Raised when the root view content of this window is set or changed.
Bringing a window up follows a fixed order that app code can rely on: Application ready -> Application windowOpen -> the raw platform connect/create event (sceneWillConnect / activityCreated) -> content resolution (the window content resolver, or the legacy launch bridge for the first window) -> contentLoaded -> activate and displayed.
Parameters
| Parameter | Type |
|---|---|
event | "sceneWillEnterForeground" |
callback | (args: SceneEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "sceneDidEnterBackground",
callback: (args: SceneEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:352
Raised when the root view content of this window is set or changed.
Bringing a window up follows a fixed order that app code can rely on: Application ready -> Application windowOpen -> the raw platform connect/create event (sceneWillConnect / activityCreated) -> content resolution (the window content resolver, or the legacy launch bridge for the first window) -> contentLoaded -> activate and displayed.
Parameters
| Parameter | Type |
|---|---|
event | "sceneDidEnterBackground" |
callback | (args: SceneEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "sceneDidDisconnect",
callback: (args: SceneEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:353
Raised when the root view content of this window is set or changed.
Bringing a window up follows a fixed order that app code can rely on: Application ready -> Application windowOpen -> the raw platform connect/create event (sceneWillConnect / activityCreated) -> content resolution (the window content resolver, or the legacy launch bridge for the first window) -> contentLoaded -> activate and displayed.
Parameters
| Parameter | Type |
|---|---|
event | "sceneDidDisconnect" |
callback | (args: SceneEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "sceneOpenURLContexts",
callback: (args: SceneOpenURLContextsEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:354
Raised when the root view content of this window is set or changed.
Bringing a window up follows a fixed order that app code can rely on: Application ready -> Application windowOpen -> the raw platform connect/create event (sceneWillConnect / activityCreated) -> content resolution (the window content resolver, or the legacy launch bridge for the first window) -> contentLoaded -> activate and displayed.
Parameters
| Parameter | Type |
|---|---|
event | "sceneOpenURLContexts" |
callback | (args: SceneOpenURLContextsEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "sceneContinueUserActivity",
callback: (args: SceneContinueUserActivityEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:355
Raised when the root view content of this window is set or changed.
Bringing a window up follows a fixed order that app code can rely on: Application ready -> Application windowOpen -> the raw platform connect/create event (sceneWillConnect / activityCreated) -> content resolution (the window content resolver, or the legacy launch bridge for the first window) -> contentLoaded -> activate and displayed.
Parameters
| Parameter | Type |
|---|---|
event | "sceneContinueUserActivity" |
callback | (args: SceneContinueUserActivityEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
on(
event: "scenePerformActionForShortcutItem",
callback: (args: ScenePerformActionForShortcutItemEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:356
Adds a listener for the specified event name.
Parameters
| Parameter | Type | Description |
|---|---|---|
event | "scenePerformActionForShortcutItem" | - |
callback | (args: ScenePerformActionForShortcutItemEventData) => void | The event listener to add. Will be called when an event of the given name is raised. |
thisArg? | any | An optional parameter which, when set, will be bound as the this context when the callback is called. Falsy values will be not be bound. |
Returns
void
Overrides
Call Signature
on(
eventName: string,
callback: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:357
Raised when the root view content of this window is set or changed.
Bringing a window up follows a fixed order that app code can rely on: Application ready -> Application windowOpen -> the raw platform connect/create event (sceneWillConnect / activityCreated) -> content resolution (the window content resolver, or the legacy launch bridge for the first window) -> contentLoaded -> activate and displayed.
Parameters
| Parameter | Type |
|---|---|
eventName | string |
callback | (data: NativeWindowEventData) => void |
thisArg? | any |
Returns
void
Overrides
WindowBase.ononce()
Call Signature
once(
event: "contentLoaded",
callback: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:359
Adds a listener for the specified event name, which, once fired, will remove itself.
Parameters
| Parameter | Type | Description |
|---|---|---|
event | "contentLoaded" | - |
callback | (data: NativeWindowEventData) => void | The event listener to add. Will be called when an event of the given name is raised. |
thisArg? | any | An optional parameter which, when set, will be bound as the this context when the callback is called. Falsy values will be not be bound. |
Returns
void
Overrides
Call Signature
once(
event: "activate",
callback: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:360
Parameters
| Parameter | Type |
|---|---|
event | "activate" |
callback | (data: NativeWindowEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "deactivate",
callback: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:361
Parameters
| Parameter | Type |
|---|---|
event | "deactivate" |
callback | (data: NativeWindowEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "background",
callback: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:362
Parameters
| Parameter | Type |
|---|---|
event | "background" |
callback | (data: NativeWindowEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "foreground",
callback: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:363
Parameters
| Parameter | Type |
|---|---|
event | "foreground" |
callback | (data: NativeWindowEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "attached",
callback: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:364
Parameters
| Parameter | Type |
|---|---|
event | "attached" |
callback | (data: NativeWindowEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "detached",
callback: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:365
Parameters
| Parameter | Type |
|---|---|
event | "detached" |
callback | (data: NativeWindowEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "close",
callback: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:366
Parameters
| Parameter | Type |
|---|---|
event | "close" |
callback | (data: NativeWindowEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "displayed",
callback: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:367
Parameters
| Parameter | Type |
|---|---|
event | "displayed" |
callback | (data: NativeWindowEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "orientationChanged",
callback: (data: WindowOrientationChangedEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:368
Parameters
| Parameter | Type |
|---|---|
event | "orientationChanged" |
callback | (data: WindowOrientationChangedEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "systemAppearanceChanged",
callback: (data: WindowSystemAppearanceChangedEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:369
Parameters
| Parameter | Type |
|---|---|
event | "systemAppearanceChanged" |
callback | (data: WindowSystemAppearanceChangedEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "layoutDirectionChanged",
callback: (data: WindowLayoutDirectionChangedEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:370
Parameters
| Parameter | Type |
|---|---|
event | "layoutDirectionChanged" |
callback | (data: WindowLayoutDirectionChangedEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "activityCreated",
callback: (args: AndroidActivityBundleEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:371
Parameters
| Parameter | Type |
|---|---|
event | "activityCreated" |
callback | (args: AndroidActivityBundleEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "activityDestroyed",
callback: (args: AndroidActivityEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:372
Parameters
| Parameter | Type |
|---|---|
event | "activityDestroyed" |
callback | (args: AndroidActivityEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "activityStarted",
callback: (args: AndroidActivityEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:373
Parameters
| Parameter | Type |
|---|---|
event | "activityStarted" |
callback | (args: AndroidActivityEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "activityPaused",
callback: (args: AndroidActivityEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:374
Parameters
| Parameter | Type |
|---|---|
event | "activityPaused" |
callback | (args: AndroidActivityEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "activityResumed",
callback: (args: AndroidActivityEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:375
Parameters
| Parameter | Type |
|---|---|
event | "activityResumed" |
callback | (args: AndroidActivityEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "activityStopped",
callback: (args: AndroidActivityEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:376
Parameters
| Parameter | Type |
|---|---|
event | "activityStopped" |
callback | (args: AndroidActivityEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "saveActivityState",
callback: (args: AndroidActivityBundleEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:377
Parameters
| Parameter | Type |
|---|---|
event | "saveActivityState" |
callback | (args: AndroidActivityBundleEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "activityResult",
callback: (args: AndroidActivityResultEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:378
Parameters
| Parameter | Type |
|---|---|
event | "activityResult" |
callback | (args: AndroidActivityResultEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "activityBackPressed",
callback: (args: AndroidActivityBackPressedEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:379
Parameters
| Parameter | Type |
|---|---|
event | "activityBackPressed" |
callback | (args: AndroidActivityBackPressedEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "activityNewIntent",
callback: (args: AndroidActivityNewIntentEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:380
Parameters
| Parameter | Type |
|---|---|
event | "activityNewIntent" |
callback | (args: AndroidActivityNewIntentEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "activityRequestPermissions",
callback: (args: AndroidActivityRequestPermissionsEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:381
Parameters
| Parameter | Type |
|---|---|
event | "activityRequestPermissions" |
callback | (args: AndroidActivityRequestPermissionsEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "sceneWillConnect",
callback: (args: SceneEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:382
Parameters
| Parameter | Type |
|---|---|
event | "sceneWillConnect" |
callback | (args: SceneEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "sceneDidActivate",
callback: (args: SceneEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:383
Parameters
| Parameter | Type |
|---|---|
event | "sceneDidActivate" |
callback | (args: SceneEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "sceneWillResignActive",
callback: (args: SceneEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:384
Parameters
| Parameter | Type |
|---|---|
event | "sceneWillResignActive" |
callback | (args: SceneEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "sceneWillEnterForeground",
callback: (args: SceneEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:385
Parameters
| Parameter | Type |
|---|---|
event | "sceneWillEnterForeground" |
callback | (args: SceneEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "sceneDidEnterBackground",
callback: (args: SceneEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:386
Parameters
| Parameter | Type |
|---|---|
event | "sceneDidEnterBackground" |
callback | (args: SceneEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "sceneDidDisconnect",
callback: (args: SceneEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:387
Parameters
| Parameter | Type |
|---|---|
event | "sceneDidDisconnect" |
callback | (args: SceneEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "sceneOpenURLContexts",
callback: (args: SceneOpenURLContextsEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:388
Parameters
| Parameter | Type |
|---|---|
event | "sceneOpenURLContexts" |
callback | (args: SceneOpenURLContextsEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "sceneContinueUserActivity",
callback: (args: SceneContinueUserActivityEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:389
Parameters
| Parameter | Type |
|---|---|
event | "sceneContinueUserActivity" |
callback | (args: SceneContinueUserActivityEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
event: "scenePerformActionForShortcutItem",
callback: (args: ScenePerformActionForShortcutItemEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:390
Adds a listener for the specified event name that is removed as soon as it is raised once.
Parameters
| Parameter | Type |
|---|---|
event | "scenePerformActionForShortcutItem" |
callback | (args: ScenePerformActionForShortcutItemEventData) => void |
thisArg? | any |
Returns
void
Overrides
Call Signature
once(
eventName: string,
callback: (data: NativeWindowEventData) => void,
thisArg?: any): void;Defined in: native-window/index.d.ts:391
Parameters
| Parameter | Type |
|---|---|
eventName | string |
callback | (data: NativeWindowEventData) => void |
thisArg? | any |
Returns
void
Overrides
WindowBase.onceorientation()
orientation(): "portrait" | "landscape" | "unknown";Defined in: native-window/index.d.ts:292
The current orientation of this window.
Read from the native surface while the window is attached; a detached window reports the last value it saw. A read that catches a change the platform has not reported yet also raises orientationChanged, so a change is never swallowed by the reading.
Returns
"portrait" | "landscape" | "unknown"
removeEventListener()
removeEventListener(
eventName: string,
callback?: (data: EventData) => void,
thisArg?: any): void;Defined in: data/observable/index.ts
Removes listener(s) for the specified event name.
Parameters
| Parameter | Type | Description |
|---|---|---|
eventName | string | Name of the event to attach to. |
callback? | (data: EventData) => void | An optional parameter pointing to a specific listener. If not defined, all listeners for the event names will be removed. |
thisArg? | any | An optional parameter which when set will be used to refine search of the correct callback which will be removed as event listener. |
Returns
void
Inherited from
WindowBase.removeEventListener
set()
set(name: string, value: any): void;Defined in: data/observable/index.ts
Updates the specified property with the provided value.
Parameters
| Parameter | Type |
|---|---|
name | string |
value | any |
Returns
void
Inherited from
setContent()
setContent(content: string | View | NavigationEntry): void;Defined in: native-window/index.d.ts:283
Sets the content of this window.
Replaces any content set earlier, tears the previous root view down and raises contentLoaded.
A view that is already the root of another window is released from it first — that window's rootView becomes null — while the view itself is left intact.
Parameters
| Parameter | Type | Description |
|---|---|---|
content | string | View | NavigationEntry | A View, a NavigationEntry, or the name of a module to load. |
Returns
void
setProperty()
setProperty(name: string, value: any): void;Defined in: data/observable/index.ts
Updates the specified property with the provided value and raises a property change event and a specific change event based on the property name.
Parameters
| Parameter | Type |
|---|---|
name | string |
value | any |
Returns
void
Inherited from
systemAppearance()
systemAppearance(): "dark" | "light";Defined in: native-window/index.d.ts:301
The current system appearance of this window.
Read from the native surface while the window is attached; a detached window reports the last value it saw. A read that catches a change the platform has not reported yet also raises systemAppearanceChanged, so a change is never swallowed by the reading.
Returns
"dark" | "light"
addEventListener()
static addEventListener(
eventName: string,
callback: (data: EventData) => void,
thisArg?: any,
once?: boolean): void;Defined in: data/observable/index.ts
Please avoid using the static event-handling APIs as they will be removed in future.
Parameters
| Parameter | Type |
|---|---|
eventName | string |
callback | (data: EventData) => void |
thisArg? | any |
once? | boolean |
Returns
void
Deprecated
Inherited from
off()
static off(
eventName: string,
callback?: (data: EventData) => void,
thisArg?: any): void;Defined in: data/observable/index.ts
Please avoid using the static event-handling APIs as they will be removed in future.
Parameters
| Parameter | Type |
|---|---|
eventName | string |
callback? | (data: EventData) => void |
thisArg? | any |
Returns
void
Deprecated
Inherited from
on()
static on(
eventName: string,
callback: (data: EventData) => void,
thisArg?: any,
once?: boolean): void;Defined in: data/observable/index.ts
Please avoid using the static event-handling APIs as they will be removed in future.
Parameters
| Parameter | Type |
|---|---|
eventName | string |
callback | (data: EventData) => void |
thisArg? | any |
once? | boolean |
Returns
void
Deprecated
Inherited from
once()
static once(
eventName: string,
callback: (data: EventData) => void,
thisArg?: any): void;Defined in: data/observable/index.ts
Please avoid using the static event-handling APIs as they will be removed in future.
Parameters
| Parameter | Type |
|---|---|
eventName | string |
callback | (data: EventData) => void |
thisArg? | any |
Returns
void
Deprecated
Inherited from
removeEventListener()
static removeEventListener(
eventName: string,
callback?: (data: EventData) => void,
thisArg?: any): void;Defined in: data/observable/index.ts
Please avoid using the static event-handling APIs as they will be removed in future.
Parameters
| Parameter | Type |
|---|---|
eventName | string |
callback? | (data: EventData) => void |
thisArg? | any |
Returns
void
Deprecated
Inherited from
- Previous
- ModuleNameResolver
- Next
- NavigationButton