Merge branch 'next' into svg
Conflicts: archive/v0.1.2/mithril-tests.js archive/v0.1.2/mithril.min.js archive/v0.1.2/mithril.min.map archive/v0.1.2/mithril.min.zip mithril.js tests/mithril-tests.js
This commit is contained in:
commit
1aef5dd942
171 changed files with 14131 additions and 105 deletions
|
|
@ -10,6 +10,12 @@ mock.window = new function() {
|
|||
appendChild: window.document.appendChild,
|
||||
removeChild: window.document.removeChild,
|
||||
replaceChild: window.document.replaceChild,
|
||||
insertBefore: function(node, reference) {
|
||||
node.parentNode = this
|
||||
var index = this.childNodes.indexOf(reference)
|
||||
if (index < 0) this.childNodes.push(node)
|
||||
else this.childNodes.splice(index, 0, node)
|
||||
},
|
||||
setAttribute: function(name, value) {
|
||||
this[name] = value.toString()
|
||||
},
|
||||
|
|
@ -18,7 +24,7 @@ mock.window = new function() {
|
|||
},
|
||||
getAttribute: function(name, value) {
|
||||
return this[name]
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
window.document.createElementNS = function(namespace, tag) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue