Reference implementation

The reference implementation of the HTML5 Navigator consists of seven JavaScript files.

These files are located in this target image directory:

/apps/Navigator.devTest_Navigator__a4514a37/native/js/

The following table gives the key responsibilities of each file:

Table 1. Navigator implementation files
File Key Responsibilities
Applications.js Navigator.Applications provides functions that operate on apps, including start, stop, show, and hide.
EventDispatcher.js Navigator.EventDispatcher provides functions for objects to register listeners for events. This class is a base class for Navigator.Applications, Navigator.Status, Navigator.Tabs, and Navigator.Voice.
HNM.js

Navigator.HNM registers PPS listeners for:

  • navigatorhnmstatus
  • navigatorhnmnotification
index.js

Defines properties for an app's WebView and layout.

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

  • E_APP_STARTED
  • E_APP_STOPPED
  • E_APP_GROUP_COMPLETE
  • E_APP_ERROR
  • E_APP_COVER_CHANGE

Registers PPS listeners for:

  • navigatorstartrequest
  • navigatorstoprequest
Navigator.js Sets up infrastructure to permit inheritance from JavaScript objects.
Tabs.js Navigator.Tabs provides functions that operate on tabs, including create, remove, and highlight.
Voice.js Navigator.Voice provides functions for updating the HMI based on the activity of the voice subsystem, including select, cancel, and addItem.