NativeScript 9.1 Released → V8 14.9, Vite 8 HMR, built for rapid agentic visual iteration
Dig in

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 ​

ts
new NativeWindow(): NativeWindow;

Returns ​

NativeWindow

Inherited from ​

WindowBase.constructor

Properties ​

android? ​

ts
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 ​

ts
readonly activity: AppCompatActivity;

Inherited from ​

WindowBase.android


id ​

ts
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 ​

WindowBase.id


ios? ​

ts
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? ​

ts
readonly optional scene?: UIWindowScene;

uiWindow ​

ts
readonly uiWindow: UIWindow;

Inherited from ​

WindowBase.ios


isPrimary ​

ts
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 ​

WindowBase.isPrimary


role ​

ts
readonly role: WindowRole;

Defined in: native-window/index.d.ts:46

The purpose this window surface serves.

Inherited from ​

WindowBase.role


rootView ​

ts
readonly rootView: View;

Defined in: native-window/index.d.ts:270

The root view currently hosted by this window, if any.


state ​

ts
readonly state: WindowState;

Defined in: native-window/index.d.ts:51

Where this window currently sits in its lifecycle.

Inherited from ​

WindowBase.state


propertyChangeEvent ​

ts
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() ​

ts
_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 ​

ParameterType
propertyNamestring
valueany
oldValue?any

Returns ​

PropertyChangeData

Inherited from ​

WindowBase._createPropertyChangeData


_emit() ​

ts
_emit(eventName: string): void;

Defined in: data/observable/index.ts

Parameters ​

ParameterType
eventNamestring

Returns ​

void

Inherited from ​

WindowBase._emit


addEventListener() ​

ts
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 ​

ParameterTypeDescription
eventNamestringName of the event to attach to.
callback(data: EventData) => voidA function to be called when some of the specified event(s) is raised.
thisArg?anyAn optional parameter which when set will be used as "this" in callback method call.
once?booleanAn optional parameter which when set will cause the event listener to fire once.

Returns ​

void

Inherited from ​

WindowBase.addEventListener


close() ​

ts
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 ​

WindowBase.close


get() ​

ts
get(name: string): any;

Defined in: data/observable/index.ts

Gets the value of the specified property.

Parameters ​

ParameterType
namestring

Returns ​

any

Inherited from ​

WindowBase.get


hasListeners() ​

ts
hasListeners(eventName: string): boolean;

Defined in: data/observable/index.ts

Checks whether a listener is registered for the specified event name.

Parameters ​

ParameterTypeDescription
eventNamestringThe name of the event to check for.

Returns ​

boolean

Inherited from ​

WindowBase.hasListeners


layoutDirection() ​

ts
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 ​

LayoutDirectionType


notify() ​

ts
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 ​

ParameterTypeDescription
dataTan 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 ​

WindowBase.notify


notifyPropertyChange() ​

ts
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 ​

ParameterType
namestring
valueany
oldValue?any

Returns ​

void

Inherited from ​

WindowBase.notifyPropertyChange


off() ​

Call Signature ​

ts
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 ​
ParameterTypeDescription
event"contentLoaded"-
callback?(data: NativeWindowEventData) => voidAn optional specific event listener to remove (if omitted, all event listeners by this name will be removed).
thisArg?anyAn optional parameter which, when set, will be used to refine search of the correct event listener to be removed.
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "activate", 
   callback?: (data: NativeWindowEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:394

Parameters ​
ParameterType
event"activate"
callback?(data: NativeWindowEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "deactivate", 
   callback?: (data: NativeWindowEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:395

Parameters ​
ParameterType
event"deactivate"
callback?(data: NativeWindowEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "background", 
   callback?: (data: NativeWindowEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:396

Parameters ​
ParameterType
event"background"
callback?(data: NativeWindowEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "foreground", 
   callback?: (data: NativeWindowEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:397

Parameters ​
ParameterType
event"foreground"
callback?(data: NativeWindowEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "attached", 
   callback?: (data: NativeWindowEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:398

Parameters ​
ParameterType
event"attached"
callback?(data: NativeWindowEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "detached", 
   callback?: (data: NativeWindowEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:399

Parameters ​
ParameterType
event"detached"
callback?(data: NativeWindowEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "close", 
   callback?: (data: NativeWindowEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:400

Parameters ​
ParameterType
event"close"
callback?(data: NativeWindowEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "displayed", 
   callback?: (data: NativeWindowEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:401

Parameters ​
ParameterType
event"displayed"
callback?(data: NativeWindowEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "orientationChanged", 
   callback?: (data: WindowOrientationChangedEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:402

Parameters ​
ParameterType
event"orientationChanged"
callback?(data: WindowOrientationChangedEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "systemAppearanceChanged", 
   callback?: (data: WindowSystemAppearanceChangedEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:403

Parameters ​
ParameterType
event"systemAppearanceChanged"
callback?(data: WindowSystemAppearanceChangedEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "layoutDirectionChanged", 
   callback?: (data: WindowLayoutDirectionChangedEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:404

Parameters ​
ParameterType
event"layoutDirectionChanged"
callback?(data: WindowLayoutDirectionChangedEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "activityCreated", 
   callback?: (args: AndroidActivityBundleEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:405

Parameters ​
ParameterType
event"activityCreated"
callback?(args: AndroidActivityBundleEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "activityDestroyed", 
   callback?: (args: AndroidActivityEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:406

Parameters ​
ParameterType
event"activityDestroyed"
callback?(args: AndroidActivityEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "activityStarted", 
   callback?: (args: AndroidActivityEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:407

Parameters ​
ParameterType
event"activityStarted"
callback?(args: AndroidActivityEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "activityPaused", 
   callback?: (args: AndroidActivityEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:408

Parameters ​
ParameterType
event"activityPaused"
callback?(args: AndroidActivityEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "activityResumed", 
   callback?: (args: AndroidActivityEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:409

Parameters ​
ParameterType
event"activityResumed"
callback?(args: AndroidActivityEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "activityStopped", 
   callback?: (args: AndroidActivityEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:410

Parameters ​
ParameterType
event"activityStopped"
callback?(args: AndroidActivityEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "saveActivityState", 
   callback?: (args: AndroidActivityBundleEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:411

Parameters ​
ParameterType
event"saveActivityState"
callback?(args: AndroidActivityBundleEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "activityResult", 
   callback?: (args: AndroidActivityResultEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:412

Parameters ​
ParameterType
event"activityResult"
callback?(args: AndroidActivityResultEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "activityBackPressed", 
   callback?: (args: AndroidActivityBackPressedEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:413

Parameters ​
ParameterType
event"activityBackPressed"
callback?(args: AndroidActivityBackPressedEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "activityNewIntent", 
   callback?: (args: AndroidActivityNewIntentEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:414

Parameters ​
ParameterType
event"activityNewIntent"
callback?(args: AndroidActivityNewIntentEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "activityRequestPermissions", 
   callback?: (args: AndroidActivityRequestPermissionsEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:415

Parameters ​
ParameterType
event"activityRequestPermissions"
callback?(args: AndroidActivityRequestPermissionsEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "sceneWillConnect", 
   callback?: (args: SceneEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:416

Parameters ​
ParameterType
event"sceneWillConnect"
callback?(args: SceneEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "sceneDidActivate", 
   callback?: (args: SceneEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:417

Parameters ​
ParameterType
event"sceneDidActivate"
callback?(args: SceneEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "sceneWillResignActive", 
   callback?: (args: SceneEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:418

Parameters ​
ParameterType
event"sceneWillResignActive"
callback?(args: SceneEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "sceneWillEnterForeground", 
   callback?: (args: SceneEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:419

Parameters ​
ParameterType
event"sceneWillEnterForeground"
callback?(args: SceneEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "sceneDidEnterBackground", 
   callback?: (args: SceneEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:420

Parameters ​
ParameterType
event"sceneDidEnterBackground"
callback?(args: SceneEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "sceneDidDisconnect", 
   callback?: (args: SceneEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:421

Parameters ​
ParameterType
event"sceneDidDisconnect"
callback?(args: SceneEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "sceneOpenURLContexts", 
   callback?: (args: SceneOpenURLContextsEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:422

Parameters ​
ParameterType
event"sceneOpenURLContexts"
callback?(args: SceneOpenURLContextsEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   event: "sceneContinueUserActivity", 
   callback?: (args: SceneContinueUserActivityEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:423

Parameters ​
ParameterType
event"sceneContinueUserActivity"
callback?(args: SceneContinueUserActivityEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
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 ​
ParameterType
event"scenePerformActionForShortcutItem"
callback?(args: ScenePerformActionForShortcutItemEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.off

Call Signature ​

ts
off(
   eventName: string, 
   callback?: (data: NativeWindowEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:425

Parameters ​
ParameterType
eventNamestring
callback?(data: NativeWindowEventData) => void
thisArg?any
Returns ​

void

Overrides ​
ts
WindowBase.off

on() ​

Call Signature ​

ts
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 ​
ParameterType
event"contentLoaded"
callback(data: NativeWindowEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"activate"
callback(data: NativeWindowEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"deactivate"
callback(data: NativeWindowEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"background"
callback(data: NativeWindowEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"foreground"
callback(data: NativeWindowEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"attached"
callback(data: NativeWindowEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"detached"
callback(data: NativeWindowEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"close"
callback(data: NativeWindowEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"displayed"
callback(data: NativeWindowEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"orientationChanged"
callback(data: WindowOrientationChangedEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"systemAppearanceChanged"
callback(data: WindowSystemAppearanceChangedEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"layoutDirectionChanged"
callback(data: WindowLayoutDirectionChangedEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"activityCreated"
callback(args: AndroidActivityBundleEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"activityDestroyed"
callback(args: AndroidActivityEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"activityStarted"
callback(args: AndroidActivityEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"activityPaused"
callback(args: AndroidActivityEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"activityResumed"
callback(args: AndroidActivityEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"activityStopped"
callback(args: AndroidActivityEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"saveActivityState"
callback(args: AndroidActivityBundleEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"activityResult"
callback(args: AndroidActivityResultEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"activityBackPressed"
callback(args: AndroidActivityBackPressedEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"activityNewIntent"
callback(args: AndroidActivityNewIntentEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"activityRequestPermissions"
callback(args: AndroidActivityRequestPermissionsEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"sceneWillConnect"
callback(args: SceneEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"sceneDidActivate"
callback(args: SceneEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"sceneWillResignActive"
callback(args: SceneEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"sceneWillEnterForeground"
callback(args: SceneEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"sceneDidEnterBackground"
callback(args: SceneEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"sceneDidDisconnect"
callback(args: SceneEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"sceneOpenURLContexts"
callback(args: SceneOpenURLContextsEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
event"sceneContinueUserActivity"
callback(args: SceneContinueUserActivityEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterTypeDescription
event"scenePerformActionForShortcutItem"-
callback(args: ScenePerformActionForShortcutItemEventData) => voidThe event listener to add. Will be called when an event of the given name is raised.
thisArg?anyAn 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 ​

WindowBase.on

Call Signature ​

ts
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 ​
ParameterType
eventNamestring
callback(data: NativeWindowEventData) => void
thisArg?any
Returns ​

void

Overrides ​
ts
WindowBase.on

once() ​

Call Signature ​

ts
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 ​
ParameterTypeDescription
event"contentLoaded"-
callback(data: NativeWindowEventData) => voidThe event listener to add. Will be called when an event of the given name is raised.
thisArg?anyAn 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 ​

WindowBase.once

Call Signature ​

ts
once(
   event: "activate", 
   callback: (data: NativeWindowEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:360

Parameters ​
ParameterType
event"activate"
callback(data: NativeWindowEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   event: "deactivate", 
   callback: (data: NativeWindowEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:361

Parameters ​
ParameterType
event"deactivate"
callback(data: NativeWindowEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   event: "background", 
   callback: (data: NativeWindowEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:362

Parameters ​
ParameterType
event"background"
callback(data: NativeWindowEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   event: "foreground", 
   callback: (data: NativeWindowEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:363

Parameters ​
ParameterType
event"foreground"
callback(data: NativeWindowEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   event: "attached", 
   callback: (data: NativeWindowEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:364

Parameters ​
ParameterType
event"attached"
callback(data: NativeWindowEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   event: "detached", 
   callback: (data: NativeWindowEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:365

Parameters ​
ParameterType
event"detached"
callback(data: NativeWindowEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   event: "close", 
   callback: (data: NativeWindowEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:366

Parameters ​
ParameterType
event"close"
callback(data: NativeWindowEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   event: "displayed", 
   callback: (data: NativeWindowEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:367

Parameters ​
ParameterType
event"displayed"
callback(data: NativeWindowEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   event: "orientationChanged", 
   callback: (data: WindowOrientationChangedEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:368

Parameters ​
ParameterType
event"orientationChanged"
callback(data: WindowOrientationChangedEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   event: "systemAppearanceChanged", 
   callback: (data: WindowSystemAppearanceChangedEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:369

Parameters ​
ParameterType
event"systemAppearanceChanged"
callback(data: WindowSystemAppearanceChangedEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   event: "layoutDirectionChanged", 
   callback: (data: WindowLayoutDirectionChangedEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:370

Parameters ​
ParameterType
event"layoutDirectionChanged"
callback(data: WindowLayoutDirectionChangedEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   event: "activityCreated", 
   callback: (args: AndroidActivityBundleEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:371

Parameters ​
ParameterType
event"activityCreated"
callback(args: AndroidActivityBundleEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   event: "activityDestroyed", 
   callback: (args: AndroidActivityEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:372

Parameters ​
ParameterType
event"activityDestroyed"
callback(args: AndroidActivityEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   event: "activityStarted", 
   callback: (args: AndroidActivityEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:373

Parameters ​
ParameterType
event"activityStarted"
callback(args: AndroidActivityEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   event: "activityPaused", 
   callback: (args: AndroidActivityEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:374

Parameters ​
ParameterType
event"activityPaused"
callback(args: AndroidActivityEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   event: "activityResumed", 
   callback: (args: AndroidActivityEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:375

Parameters ​
ParameterType
event"activityResumed"
callback(args: AndroidActivityEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   event: "activityStopped", 
   callback: (args: AndroidActivityEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:376

Parameters ​
ParameterType
event"activityStopped"
callback(args: AndroidActivityEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   event: "saveActivityState", 
   callback: (args: AndroidActivityBundleEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:377

Parameters ​
ParameterType
event"saveActivityState"
callback(args: AndroidActivityBundleEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   event: "activityResult", 
   callback: (args: AndroidActivityResultEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:378

Parameters ​
ParameterType
event"activityResult"
callback(args: AndroidActivityResultEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   event: "activityBackPressed", 
   callback: (args: AndroidActivityBackPressedEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:379

Parameters ​
ParameterType
event"activityBackPressed"
callback(args: AndroidActivityBackPressedEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   event: "activityNewIntent", 
   callback: (args: AndroidActivityNewIntentEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:380

Parameters ​
ParameterType
event"activityNewIntent"
callback(args: AndroidActivityNewIntentEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   event: "activityRequestPermissions", 
   callback: (args: AndroidActivityRequestPermissionsEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:381

Parameters ​
ParameterType
event"activityRequestPermissions"
callback(args: AndroidActivityRequestPermissionsEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   event: "sceneWillConnect", 
   callback: (args: SceneEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:382

Parameters ​
ParameterType
event"sceneWillConnect"
callback(args: SceneEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   event: "sceneDidActivate", 
   callback: (args: SceneEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:383

Parameters ​
ParameterType
event"sceneDidActivate"
callback(args: SceneEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   event: "sceneWillResignActive", 
   callback: (args: SceneEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:384

Parameters ​
ParameterType
event"sceneWillResignActive"
callback(args: SceneEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   event: "sceneWillEnterForeground", 
   callback: (args: SceneEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:385

Parameters ​
ParameterType
event"sceneWillEnterForeground"
callback(args: SceneEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   event: "sceneDidEnterBackground", 
   callback: (args: SceneEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:386

Parameters ​
ParameterType
event"sceneDidEnterBackground"
callback(args: SceneEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   event: "sceneDidDisconnect", 
   callback: (args: SceneEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:387

Parameters ​
ParameterType
event"sceneDidDisconnect"
callback(args: SceneEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   event: "sceneOpenURLContexts", 
   callback: (args: SceneOpenURLContextsEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:388

Parameters ​
ParameterType
event"sceneOpenURLContexts"
callback(args: SceneOpenURLContextsEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   event: "sceneContinueUserActivity", 
   callback: (args: SceneContinueUserActivityEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:389

Parameters ​
ParameterType
event"sceneContinueUserActivity"
callback(args: SceneContinueUserActivityEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
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 ​
ParameterType
event"scenePerformActionForShortcutItem"
callback(args: ScenePerformActionForShortcutItemEventData) => void
thisArg?any
Returns ​

void

Overrides ​

WindowBase.once

Call Signature ​

ts
once(
   eventName: string, 
   callback: (data: NativeWindowEventData) => void, 
   thisArg?: any): void;

Defined in: native-window/index.d.ts:391

Parameters ​
ParameterType
eventNamestring
callback(data: NativeWindowEventData) => void
thisArg?any
Returns ​

void

Overrides ​
ts
WindowBase.once

orientation() ​

ts
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() ​

ts
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 ​

ParameterTypeDescription
eventNamestringName of the event to attach to.
callback?(data: EventData) => voidAn optional parameter pointing to a specific listener. If not defined, all listeners for the event names will be removed.
thisArg?anyAn 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() ​

ts
set(name: string, value: any): void;

Defined in: data/observable/index.ts

Updates the specified property with the provided value.

Parameters ​

ParameterType
namestring
valueany

Returns ​

void

Inherited from ​

WindowBase.set


setContent() ​

ts
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 ​

ParameterTypeDescription
contentstring | View | NavigationEntryA View, a NavigationEntry, or the name of a module to load.

Returns ​

void


setProperty() ​

ts
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 ​

ParameterType
namestring
valueany

Returns ​

void

Inherited from ​

WindowBase.setProperty


systemAppearance() ​

ts
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() ​

ts
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 ​

ParameterType
eventNamestring
callback(data: EventData) => void
thisArg?any
once?boolean

Returns ​

void

Deprecated ​

Inherited from ​

WindowBase.addEventListener


off() ​

ts
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 ​

ParameterType
eventNamestring
callback?(data: EventData) => void
thisArg?any

Returns ​

void

Deprecated ​

Inherited from ​

WindowBase.off


on() ​

ts
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 ​

ParameterType
eventNamestring
callback(data: EventData) => void
thisArg?any
once?boolean

Returns ​

void

Deprecated ​

Inherited from ​

WindowBase.on


once() ​

ts
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 ​

ParameterType
eventNamestring
callback(data: EventData) => void
thisArg?any

Returns ​

void

Deprecated ​

Inherited from ​

WindowBase.once


removeEventListener() ​

ts
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 ​

ParameterType
eventNamestring
callback?(data: EventData) => void
thisArg?any

Returns ​

void

Deprecated ​

Inherited from ​

WindowBase.removeEventListener