Module: caf_components/main

Main package module.



load($, specopt, resourceName, modules, staticArtifactsopt, cb)

Creates and initializes a hierarchy of asynchronous components.

Name Type Attributes Description
$ null | ctxType

A context for the top level component. If null a new one is created. Otherwise, it should be a properly initialized context, i.e., with top level objects $._ and $._.$.

spec specDeltaType <optional>

Extra configuration data that will be merged with the resource description. For example, to override the default name of the top component use {name: "foo"}.

resourceName string

The name of a component description file.

modules null | Array.<Object>

A sequence of modules to load descriptions and implementations (see module:caf_components/gen_loader). Use null to avoid modifying the current loader configuration.

staticArtifacts Object.<string, Object> <optional>

An optional collection of already loaded modules and files.

cb cbType

A callback to return context $ with the new top level component or an error.