SipaHooks
SipaHooks
SipaHooks
App hook manager
SipaHooks.beforeInitPage(type, func, page_id)
Set, remove or trigger event 'beforeInitPage'
Param | Type | Description |
---|---|---|
type | HookType | |
func | function | function to set or remove, ignored if parameter type is 'trigger' |
page_id | string |
Example
SipaHooks.beforeInitPage('on', () => {
console.log("This is run before onInit() of any page is executed!");
}
SipaHooks.beforeShowPage(type, func, page_id)
Set, remove or trigger event 'beforeShowPage'
Param | Type | Description |
---|---|---|
type | HookType | |
func | function | function to set or remove, ignored if parameter type is 'trigger' |
page_id | string |
SipaHooks.beforeDestroyPage(type, func, page_id)
Set, remove or trigger event 'beforeDestroyPage'
Param | Type | Description |
---|---|---|
type | HookType | |
func | function | function to set or remove, ignored if parameter type is 'trigger' |
page_id | string |
Example
SipaHooks.beforeDestroyPage('on', () => {
console.log("This is run before onDestroy() of any page is executed!");
}
SipaHooks.beforeInitLayout(type, func, layout_id)
Set, remove or trigger event 'beforeInitLayout'
Param | Type | Description |
---|---|---|
type | HookType | |
func | function | function to set or remove, ignored if parameter type is 'trigger' |
layout_id | string |
Example
SipaHooks.beforeInitLayout('on', () => {
console.log("This is run before onInit() of any layout is executed!");
}
SipaHooks.beforeDestroyLayout(type, func, layout_id)
Set, remove or trigger event 'beforeDestroyLayout'
Param | Type | Description |
---|---|---|
type | HookType | |
func | function | function to set or remove, ignored if parameter type is 'trigger' |
layout_id | string |
Example
SipaHooks.beforeDestroyLayout('on', () => {
console.log("This is run before onDestroy) of any layout is executed!");
}
SipaHooks.HookType : 'on'
| 'off'
| 'trigger'
Kind: static typedef of SipaHooks