Skip to main content

SipaHooks

SipaHooks

SipaHooks

App hook manager

SipaHooks.beforeInitPage(type, func, page_id)

Set, remove or trigger event 'beforeInitPage'

ParamTypeDescription
typeHookType
funcfunctionfunction to set or remove, ignored if parameter type is 'trigger'
page_idstring

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'

ParamTypeDescription
typeHookType
funcfunctionfunction to set or remove, ignored if parameter type is 'trigger'
page_idstring

SipaHooks.beforeDestroyPage(type, func, page_id)

Set, remove or trigger event 'beforeDestroyPage'

ParamTypeDescription
typeHookType
funcfunctionfunction to set or remove, ignored if parameter type is 'trigger'
page_idstring

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'

ParamTypeDescription
typeHookType
funcfunctionfunction to set or remove, ignored if parameter type is 'trigger'
layout_idstring

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'

ParamTypeDescription
typeHookType
funcfunctionfunction to set or remove, ignored if parameter type is 'trigger'
layout_idstring

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