implement keys

This commit is contained in:
Leo Horie 2014-06-13 23:33:02 -04:00
parent 31a6fe606c
commit 53672e62d7
4 changed files with 223 additions and 3 deletions

View file

@ -17,7 +17,8 @@ mock.window = new function() {
if (referenceIndex < 0) this.childNodes.push(node)
else {
var index = this.childNodes.indexOf(node)
this.childNodes.splice(referenceIndex, index < 0 ? 0 : 1, node)
if (index > -1) this.childNodes.splice(index, 1)
this.childNodes.splice(referenceIndex, 0, node)
}
},
insertAdjacentHTML: function(position, html) {