
require()Method
Description
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.
Parameters
| Type | Name | Description |
|---|---|---|
| String | ns | the fully qualified name of the class to load |
Return Value
Type: Object
the evaluated class
Example
nokia.mh5.require("nokia.mh5.xhr");
nokia.mh5.xhr("GET", {
uri: "http://www.nokia.com"
});