implement keys
This commit is contained in:
parent
31a6fe606c
commit
53672e62d7
4 changed files with 223 additions and 3 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue