Constructor
new App(containeropt, settingsopt)
Create an app instance
Parameters:
Name | Type | Attributes | Default | Description | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
container | HTMLElement | <optional> | document.body | The root container of the application. | |||||||||||||||||||||||
settings | object | <optional> | Application settings object. Properties
|
- Source
Methods
(async) destroy() → {Promise.<void>}
Destorys InfrontJS application instance
- Source
Returns:
- Type:
- Promise.<void>
getVersion() → {string}
Get InfrontJS version
- Source
Returns:
- Version string
- Type:
- string
(async) run(routeopt) → {Promise.<void>}
Run application logic. This activates the InfrontJS application logic. Note: This is an asynchronous function providing the possibility to e.g. loading assets etc.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
route | string | | <optional> | null | If route is set, this route is set initially. |
- Source
Returns:
- Type:
- Promise.<void>
(static) get(uid) → {App|null}
Parameters:
Name | Type | Default | Description |
---|---|---|---|
uid | string | | null | Get instance by given uid. If no uid is given, the first app from pool is returned. |
- Source
Returns:
- Type:
- App |
null