fix ordering issue in subchilds

This commit is contained in:
Leo Horie 2014-04-14 11:06:41 -04:00
parent d7b64ceab2
commit e65db40116
62 changed files with 7011 additions and 13 deletions

View file

@ -16,6 +16,15 @@ mock.window = new function() {
if (index < 0) this.childNodes.push(node)
else this.childNodes.splice(index, 0, node)
},
insertAdjacentHTML: function(position, html) {
//todo: accept markup
if (position == "beforebegin") {
this.parentNode.insertBefore(window.document.createTextNode(html), this)
}
else if (position == "beforeend") {
this.appendChild(window.document.createTextNode(html))
}
},
setAttribute: function(name, value) {
this[name] = value.toString()
},