Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "application"

Contains the application abstraction with all related methods.

Index

Variables

additionalSelectors

additionalSelectors: RuleSet[]

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.

appSelectors

appSelectors: RuleSet[]

cssFile

cssFile: string

The application level css file name (starting from the application root). Used to set css across all pages. Css will be applied for every page and page css will be applied after.

cssSelectorVersion

cssSelectorVersion: number

cssSelectors

cssSelectors: RuleSet[]

Cached css selectors created from the content of the css file.

exitEvent

exitEvent: string

String value used when hooking to exitevent.

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.

keyframes

keyframes: any

launchEvent

launchEvent: string

String value used when hooking to launch event.

lowMemoryEvent

lowMemoryEvent: string

String value used when hooking to lowMemory event.

mainEntry

mainEntry: NavigationEntry

The main navigation entry to be used when loading the main Page.

mainModule

mainModule: string

The main page path (without the file extension) for the application starting from the application root. For example if you have page called "main.js" in a folder called "subFolder" and your root folder is "app" you can specify mainModule like this: var application = require("application"); application.mainModule = "app/subFolder/main"; application.start();

orientationChangedEvent

orientationChangedEvent: string

String value used when hooking to orientationChanged event.

resources

resources: any

An application level static resources.

resumeEvent

resumeEvent: string

String value used when hooking to resume event.

suspendEvent

suspendEvent: string

String value used when hooking to suspend event.

uncaughtErrorEvent

uncaughtErrorEvent: string

String value used when hooking to uncaughtError event.

Functions

addCss

  • addCss(cssText: string): void

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

loadCss

  • loadCss(cssFile?: string): RuleSet[]
  • Loads css file and parses to a css syntax tree.

    Parameters

    • Optional cssFile: string

      Optional parameter to point to an arbitrary css file. If not specified, the cssFile property is used.

    Returns RuleSet[]

mergeCssSelectors

  • mergeCssSelectors(module: any): void

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
  • 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(eventNames: string, callback: function, thisArg?: any): any
  • on(event: "launch", 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: "orientationChanged", callback: function, thisArg?: any): any

onExit

  • onExit(): any

onLaunch

  • onLaunch(context?: any): void
  • The main entry point event. This method is expected to use the root frame to navigate to the main application page.

    Parameters

    • Optional context: any

    Returns void

onLowMemory

  • onLowMemory(): any

onResume

  • onResume(): any

onSuspend

  • onSuspend(): any

onUncaughtError

  • A callback to be used when an uncaught error occurs while the application is running. The application will be shut down after this method returns. Loading new UI at this point is erroneous and may lead to unpredictable results. The method is intended to be used for crash reports and/or application restart.

    Parameters

    Returns void

parseCss

  • parseCss(cssText: string, cssFileName?: string): RuleSet[]

setCssFileName

  • setCssFileName(cssFile: string): any

setResources

  • setResources(resources: any): any

start

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