defer calling of configs until DOM exists

This commit is contained in:
Leo Horie 2014-06-05 21:54:51 -04:00
parent 2d8db79cef
commit e82ac2ef71
3 changed files with 43 additions and 1 deletions

View file

@ -479,6 +479,14 @@ function testMithril(mock) {
m.render(root, [node, node]);
return success;
})
test(function() {
var root = mock.document.createElement("div")
var parent
m.render(root, m("div", m("a", {
config: function(el) {parent = el.parentNode.parentNode}
})));
return parent === root
})
//end m.render
//m.redraw