Merge remote-tracking branch 'origin/rewrite' into rewrite
This commit is contained in:
commit
fd2f381cea
2 changed files with 2 additions and 30 deletions
|
|
@ -124,32 +124,4 @@ o.spec("mount", function() {
|
|||
done()
|
||||
}, FRAME_BUDGET)
|
||||
})
|
||||
|
||||
o("updates when new mounts are instantiated", function(done) {
|
||||
var onupdate = o.spy()
|
||||
|
||||
render(root, [
|
||||
m("div[id=a]"),
|
||||
m("div[id=b]")
|
||||
])
|
||||
|
||||
mount(root.childNodes[0], {
|
||||
view : function() {
|
||||
return m("div", {
|
||||
onupdate : onupdate
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
mount(root.childNodes[1], {
|
||||
view : function() {
|
||||
return m("div", {
|
||||
oncreate : function(){
|
||||
o(onupdate.callCount).equals(1)
|
||||
done()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ module.exports = function($window) {
|
|||
}
|
||||
if (end < start) break
|
||||
}
|
||||
createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, undefined)
|
||||
createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns)
|
||||
removeNodes(parent, old, oldStart, oldEnd + 1, vnodes)
|
||||
}
|
||||
}
|
||||
|
|
@ -518,8 +518,8 @@ module.exports = function($window) {
|
|||
|
||||
if (!(vnodes instanceof Array)) vnodes = [vnodes]
|
||||
updateNodes(dom, dom.vnodes, Node.normalizeChildren(vnodes), hooks, null, undefined)
|
||||
for (var i = 0; i < hooks.length; i++) hooks[i]()
|
||||
dom.vnodes = vnodes
|
||||
for (var i = 0; i < hooks.length; i++) hooks[i]()
|
||||
if ($doc.activeElement !== active) active.focus()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue