app
App Instance
app.debug : boolean
Kind: static property of app
Default: false
app.source_version : string
Kind: static property of app
app.package : object
Kind: static property of app
app.events : module
Kind: static property of app
Summery: new events.EventEmitter();
app.window : object
Kind: static property of app
app.state : EventEmitter
App state control
Kind: static property of app
Summery: Controls State of the app. URL based event emitter *
- .state :
EventEmitter
state.$hash : EventEmitter
App state page control
Kind: static property of state
Summery: Controls State of the app. URL based event emitter state.$hash.on("/mypage",()=>{})
"render"
Triggered by window.requestAnimationFrame
Kind: event emitted by $hash
"unload"
Triggered before a page is rendered
Kind: event emitted by $hash
"200"
Triggered before a page is found
Kind: event emitted by $hash
"/{pagename}"
Triggered to load /{pagename}
Kind: event emitted by $hash
Properties
| Name | Type | Description |
|---|---|---|
| path | array |
remaining url string split with / |
| currentState | HistoryState |
current History state |
| lastState | HistoryState |
last History state |
"400"
Triggered before a page is NOT found
Kind: event emitted by $hash
state.query : object
Kind: static namespace of state
state.reload()
reload current state
Kind: static method of state
state.back()
go back 1 state
Kind: static method of state
app.dapp_info : object
Kind: static namespace of app
Properties
| Name | Type | Description |
|---|---|---|
| DAPP_PUB | string |
dapp pub key. |
| pub | string |
dapp pub key. |
| name | string |
The name of the app. |
| relay_peers | array |
The default treasure. |