Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

Commit

Permalink
Only set the parentNode on faux DOM nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Olical committed May 28, 2017
1 parent cd59275 commit 1c3a9ee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Element.js
Expand Up @@ -157,7 +157,10 @@ Element.prototype.removeEventListener = function (name, fn) {
}

Element.prototype.appendChild = function (el) {
el.parentNode = this
if (el instanceof Element) {
el.parentNode = this
}

this.childNodes.push(el)
return el
}
Expand Down

0 comments on commit 1c3a9ee

Please sign in to comment.