Constructor
new ModuleLauncher(modules, dataObserver, elementBuilder)
- Source:
Creates instance of ModuleLauncher
Parameters:
Name | Type | Description |
---|---|---|
modules |
||
dataObserver |
DataObserver | |
elementBuilder |
ElementBuilder |
Methods
(private) _addInstance(element, instance)
- Source:
register a controller instance to element
Parameters:
Name | Type | Description |
---|---|---|
element |
Element | |
instance |
function | controller instance |
(async, private) _addStyles(name, importer) → {Promise.<ModuleLauncher>}
- Source:
extract and add stylesheet
Parameters:
Name | Type | Description |
---|---|---|
name |
string | |
importer |
function |
Returns:
- Type
- Promise.<ModuleLauncher>
(async, private) _bindController(elements, signature) → {Promise.<void>}
- Source:
bind controllers from signatures
Parameters:
Name | Type | Description |
---|---|---|
elements |
Element | |
signature |
ModuleSignature |
Returns:
- Type
- Promise.<void>
(async, private) _bootstrap() → {Promise.<void>}
- Source:
bootstrap module instance iterator
Returns:
- Type
- Promise.<void>
(private) _destructInstance(element)
- Source:
call instance destruct
Parameters:
Name | Type | Description |
---|---|---|
element |
Element |
(private) _eachModule(callback)
- Source:
module iterator for each module
Parameters:
Name | Type | Default | Description |
---|---|---|---|
callback |
function | null |
null
|
(private) _init()
- Source:
initialize ModuleLoader
(async, private) _launchMatchingElements(node) → {Promise.<void>}
- Source:
launch matching elements
Parameters:
Name | Type | Description |
---|---|---|
node |
Element |
Returns:
- Type
- Promise.<void>
(private) _observeDomMutation(mutations)
- Source:
add observe DOM changes
Parameters:
Name | Type | Description |
---|---|---|
mutations |
NodeList |
registerObserver(element, options)
- Source:
register observer
Parameters:
Name | Type | Description |
---|---|---|
element |
Element | |
options |
object |
removedElement(node)
- Source:
handle removed item
Parameters:
Name | Type | Description |
---|---|---|
node |
Element |