version bump

multi-island support
typos
react comparison in home
make id change force element recreation
This commit is contained in:
Leo Horie 2014-04-19 17:56:08 -04:00
parent e65db40116
commit d57a145daa
69 changed files with 7147 additions and 24 deletions

View file

@ -64,17 +64,17 @@ function testMithril(mock) {
})
test(function() {
var root = mock.document.createElement("div")
m.render(root, m("div", {id: "a"}))
m.render(root, m("div", {class: "a"}))
var elementBefore = root.childNodes[0]
m.render(root, m("div", {id: "b"}))
m.render(root, m("div", {class: "b"}))
var elementAfter = root.childNodes[0]
return elementBefore === elementAfter
})
test(function() {
var root = mock.document.createElement("div")
m.render(root, m("#a"))
m.render(root, m(".a"))
var elementBefore = root.childNodes[0]
m.render(root, m("#b"))
m.render(root, m(".b"))
var elementAfter = root.childNodes[0]
return elementBefore === elementAfter
})
@ -304,6 +304,15 @@ function testMithril(mock) {
m.render(root, m("main", [m("button"), m("article", [m.trust("test"), m("nav")])]))
return root.childNodes[0].childNodes[1].childNodes[0].nodeValue === "test"
})
test(function() {
//https://github.com/lhorie/mithril.js/issues/55
var root = mock.document.createElement("div")
m.render(root, m("#a"))
var elementBefore = root.childNodes[0]
m.render(root, m("#b"))
var elementAfter = root.childNodes[0]
return elementBefore !== elementAfter
})
//end m.render
//m.redraw