Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/rewrite' into rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
lhorie committed Jul 27, 2016
2 parents ab6cc58 + 023956b commit fd2f381
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 30 deletions.
28 changes: 0 additions & 28 deletions api/tests/test-mount.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
})
}
})
})
})
4 changes: 2 additions & 2 deletions render/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down Expand Up @@ -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()
}

Expand Down

0 comments on commit fd2f381

Please sign in to comment.