MCPcopy
hub / github.com/MithrilJS/mithril.js / initLifecycle

Function initLifecycle

render/render.js:833–836  ·  view source on GitHub ↗
(source, vnode, hooks)

Source from the content-addressed store, hash-verified

831
832 //lifecycle
833 function initLifecycle(source, vnode, hooks) {
834 if (typeof source.oninit === "function") callHook.call(source.oninit, vnode)
835 if (typeof source.oncreate === "function") hooks.push(callHook.bind(source.oncreate, vnode))
836 }
837 function updateLifecycle(source, vnode, hooks) {
838 if (typeof source.onupdate === "function") hooks.push(callHook.bind(source.onupdate, vnode))
839 }

Callers 2

createNodeFunction · 0.70
initComponentFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected