Navigator reference implementation

The Navigator reference implementation consists of six JavaScript files.

The Navigator implementation files are located in the source code repository: path/html5/webworks/apps/Navigator/js.

The key responsibilities of each file are listed in the table below.

Table 1. Navigator implementation files
File Key Responsibilities
index.js

Defines properties for an app’s WebView, layout

Registers listeners for the following events: (defined in Navigator.Applications)

  • E_APP_STARTED
  • E_APP_STOPPED
  • E_APP_ERROR
  • E_APP_GROUP_COMPLETE
  • E_TAB_SELECTED

Registers PPS listeners for:

  • navigatorstartrequest
  • navigatorstoprequest
Navigator.js Sets up infrastructure to permit inheritance from JavaScript objects.
EventDispatcher.js Navigator.EventDispatcher provides functions with which objects can register listeners for events. Serves as a base class for Navigator.Applications, Navigator.Status, Navigator.Tabs, Navigator.Voice.
Tabs.js Navigator.Tabs provides functions that operate on tabs, for example, create, delete, and highlight.
Status.js Navigator.Status defines the status bar.
Applications.js Navigator.Applications provides functions that operate on apps, including start, stop, pause, show, and hide.