mh5Namespace

The top namespace for mh5 framework.

Methods

public each(object, fn, context) Loops through an array or object, calling a function for each element.
public extend(target, source) Extends an object by copying source object(s) properties to the target object. Target object properties that match properties in the source object(s) are overwritten, unmatched properties are copied. Note that the method is able to handle undefined source objects gracefully.
public extendDeep(target, source) Does the same what nokia.mh5.extend does but can deal with nested objects
public jsonp(uri, callback, timeoutInMs) Starts a JSONP request to a given URL, the provided callback function will be called with the response of the request. There is a timeout of 10s for JSONP calls.
public require(ns) Synchronously loads a class. After requiring a class you either use it by referencing it using the classes fully qualified name (e.g. nokia.mh5.ui.Control) or using the value returned the the require function itself (nokia.mh5.require('nokia.mh5.ui.Control') === nokia.mh5.ui.Control). See also nokia.mh5.modulePaths which stores the namespace paths.
public resolve(stringRef, startWith) Checks a path reference and returns it if it exists.
public type(obj) Detects whether the argument is of specified type. The method can detect the following types:

'arguments', 'array', 'boolean', 'date', 'function', 'null', 'number', 'object', 'string', 'undefined'

public xhr(options) Start a XMLHttpRequest with the specified options.

Properties

public String assetsPath A relative or absolute uri string to the FW asset folders are, e.g. http://api.maps.nokia.com/mobile/latest/lib/
public Object doc A reference to the document object encapuslated into the nokia.mh5 namespace In a browser or web application environment, this refers to the HTML document object.
public Object modulePaths Contains the namespace locations.

WARNING: Do not overwrite this property, just extend it.

public Object win A reference to the global object encapuslated into the nokia.mh5 namespace In a browser, this means the global window object.

Classes

public nokia.mh5.Class This class is designed to facilitate definition/creation of JavaScript classes. It supports inheritance and static members. To apply static members to the class constructor use the reserved key statics. This key must link to a hash and all of it members will be copied to the constructor. Use it to ensure that JavaScript classes are defined in a consistent way. This has advantages for maintenance, documentation, optimization, code analysis, and offers convenience.
public nokia.mh5.dom Contains functionality for DOM manipulation.
public nokia.mh5.geolocation This singleton object offers a centralized logic to properly handle geolocation events. Through this object it's possible to understand if anybody else already activated the watchPosition, if coordinates are already available, if position gets lost, updated, or generates an error. GeoLocation API may have problems with multiple watchPosition calls and this is the reason we created an event driven singleton to notify them all.
public nokia.mh5.history This class is a singleton wrapping HTML5 history. It adds a possibility to save also functions in the history states.
public nokia.mh5.math Provides methods for some mathematical functions.
public nokia.mh5.platform Static object holding information about the current platform (operating system, mobile device, ...).
HINT: It's always better to look for the feature instead for the browser!

public nokia.mh5.utils Provides useful utility functions.

Namespaces

public nokia.mh5.adapters The nokia.mh5.adapters namespace contains functionality to discover places and display their contents.
public nokia.mh5.app Contains classes which are relevant for the Application only.
public nokia.mh5.components Contains all publicly available components. A component is a combination of UI controls and behaviour.
public nokia.mh5.ui Contains a set of controls and layouts which can be used building views.

Constants

nokia.mh5 has no constants.

Interfaces

nokia.mh5 has no interfaces.