This js.Object is an empty virtual node created from within snabbdom.
This js.Object is an empty virtual node created from within snabbdom. Don't use it.
Note: you must eventually call RemoveNode callback to remove the node from the DOM
Note: you must eventually call RemoveNode callback to remove the node from the DOM
Note: you MUST eventually call RemoveNode callback to remove the node from the DOM
Note: you MUST eventually call RemoveNode callback to remove the node from the DOM
Create Hook – a DOM element has been created based on a vnode Note: this hook is not called on comment nodes.
Create Hook – a DOM element has been created based on a vnode Note: this hook is not called on comment nodes.
Destroy Hook – an element is directly or indirectly being removed
Destroy Hook – an element is directly or indirectly being removed
This hook is invoked on a virtual node when its DOM element is removed from the DOM or if its parent is being removed from the DOM.
To see the difference between this hook and the remove hook, consider an example.
var vnode1 = h('div', [h('div', [h('span', 'Hello')])]); var vnode2 = h('div', []); patch(container, vnode1); patch(vnode1, vnode2);
Here destroy is triggered for both the inner div
element and the
span
element it contains. [remove], on the other hand, is only
triggered on the div
element because it is the only element being
detached from its parent.
the patch process is done - called right at the end of patch()
the patch process begins - called right in the beginning of patch()
Remove Hook – an element is directly being removed from the DOM
Remove Hook – an element is directly being removed from the DOM
Allows you to hook into the removal of an element. The hook is called once a vnode is to be removed from the DOM. The handling function receives both the vnode and a callback. You can control and delay the removal with the callback. The callback should be invoked once the hook is done doing its business, and the element will only be removed once all remove hooks have invoked their callback.
The hook is only triggered when an element is to be removed from its parent – not if it is the child of an element that is removed. For that, see the destroy hook.
Update Hook – an element is being updated
Update Hook – an element is being updated