Bundled output for commit 62eb081a13 [skip ci]
This commit is contained in:
parent
62eb081a13
commit
d40d871a9d
3 changed files with 38 additions and 46 deletions
14
mithril.js
14
mithril.js
|
|
@ -1026,22 +1026,14 @@ var coreRenderer = function($window) {
|
|||
checkState(vnode, original)
|
||||
onremove(vnode)
|
||||
if (vnode.dom) {
|
||||
var parent = vnode.dom.parentNode
|
||||
var count0 = vnode.domSize || 1
|
||||
if (count0 > 1) {
|
||||
var dom = vnode.dom
|
||||
while (--count0) {
|
||||
removeNodeFromDOM(dom.nextSibling)
|
||||
}
|
||||
}
|
||||
removeNodeFromDOM(vnode.dom)
|
||||
while (--count0) parent.removeChild(vnode.dom.nextSibling)
|
||||
parent.removeChild(vnode.dom)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function removeNodeFromDOM(node) {
|
||||
var parent = node.parentNode
|
||||
if (parent != null) parent.removeChild(node)
|
||||
}
|
||||
function onremove(vnode) {
|
||||
if (vnode.attrs && typeof vnode.attrs.onremove === "function") callHook.call(vnode.attrs.onremove, vnode)
|
||||
if (typeof vnode.tag !== "string") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue