Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "application"

Contains the application abstraction with all related methods.

Index

Variables

Let android

This is the Android-specific application object instance. Encapsulates methods and properties specific to the Android platform. Will be undefined when TargetOS is iOS.

Const discardedErrorEvent

discardedErrorEvent: string

String value used when hooking to discardedError event.

Const displayedEvent

displayedEvent: string

String value used when hooking to displayed event.

Const exitEvent

exitEvent: string

String value used when hooking to exit event.

Let ios

This is the iOS-specific application object instance. Encapsulates methods and properties specific to the iOS platform. Will be undefined when TargetOS is Android.

Const launchEvent

launchEvent: string

String value used when hooking to launch event.

Const lowMemoryEvent

lowMemoryEvent: string

String value used when hooking to lowMemory event.

Const orientationChangedEvent

orientationChangedEvent: string

String value used when hooking to orientationChanged event.

Const resumeEvent

resumeEvent: string

String value used when hooking to resume event.

Const suspendEvent

suspendEvent: string

String value used when hooking to suspend event.

Const uncaughtErrorEvent

uncaughtErrorEvent: string

String value used when hooking to uncaughtError event.

Functions

_resetRootView

  • Call this method to change the root view of your application. Important: Your application must already be running. This method won't create Frame as root view.

    Parameters

    Returns any

addCss

  • addCss(cssText: string): void

getCssFileName

  • getCssFileName(): string

getMainEntry

getNativeApplication

  • getNativeApplication(): any

getResources

  • getResources(): any

getRootView

  • getRootView(): View

hasLaunched

  • hasLaunched(): boolean
  • Indicates if the application is allready launched. See also the application.on("launch", handler) event.

    Returns boolean

hasListeners

  • hasListeners(eventName: string): boolean
  • Checks whether a listener is registered for the specified event name.

    Parameters

    • eventName: string

      The name of the event to check for.

    Returns boolean

loadAppCss

  • loadAppCss(): any
  • Loads immediately the app.css. By default the app.css file is loaded shortly after "loaded". For the Android snapshot the CSS can be parsed during the snapshot generation, as the CSS does not depend on runtime APIs, and loadAppCss will be called explicitly.

    Returns any

notify

  • notify(data: any): void
  • Notifies all the registered listeners for the event provided in the data.eventName.

    Parameters

    • data: any

      The data associated with the event.

    Returns void

off

  • off(eventNames: string, callback?: any, thisArg?: any): any
  • off(eventNames: string, callback?: any, thisArg?: any): any
  • Removes listener for the specified event name.

    Parameters

    • eventNames: string
    • Optional callback: any
    • Optional thisArg: any

    Returns any

  • Shortcut alias to the removeEventListener method.

    Parameters

    • eventNames: string

      String corresponding to events (e.g. "onLaunch").

    • Optional callback: any

      Callback function which will be removed.

    • Optional thisArg: any

      An optional parameter which will be used as this context for callback execution.

    Returns any

on

  • on(event: "cssChanged", callback: function, thisArg?: any): any
  • on(event: "livesync", callback: function): any
  • on(eventNames: string, callback: function, thisArg?: any): any
  • on(event: "launch", callback: function, thisArg?: any): any
  • on(event: "displayed", callback: function, thisArg?: any): any
  • on(event: "suspend", callback: function, thisArg?: any): any
  • on(event: "resume", callback: function, thisArg?: any): any
  • on(event: "exit", callback: function, thisArg?: any): any
  • on(event: "lowMemory", callback: function, thisArg?: any): any
  • on(event: "uncaughtError", callback: function, thisArg?: any): any
  • on(event: "discardedError", callback: function, thisArg?: any): any
  • on(event: "orientationChanged", callback: function, thisArg?: any): any

run

  • Call this method to run the application. Important: All code after this method call will not be executed! Compared to start this method won't create Frame as root view.

    Parameters

    Returns any

setCssFileName

  • setCssFileName(cssFile: string): void

setResources

  • setResources(res: any): void
  • setResources(resources: any): any

Private shouldCreateRootFrame

  • shouldCreateRootFrame(): boolean

start

  • deprecated

    use application.run() instead.

    Call this method to start the application. Important: All code after this method call will not be executed!

    Parameters

    Returns any

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method