Comparing version 0.1.17 to 0.1.18
@@ -290,3 +290,3 @@ /* DOM Level2 Events implemented as described here: | ||
var ret = level1.call(this, newChild); | ||
if (this.nodeType == 1) { | ||
if (this.nodeType == 1 && this.ownerDocument) { | ||
var ev = this.ownerDocument.createEvent("MutationEvents"); | ||
@@ -303,5 +303,7 @@ ev.initMutationEvent("DOMNodeInserted", true, false, this, null, null, null, null); | ||
core.Node.prototype.removeChild = function(oldChild) { | ||
var ev = this.ownerDocument.createEvent("MutationEvents"); | ||
ev.initMutationEvent("DOMNodeRemoved", true, false, this, null, null, null, null); | ||
oldChild.dispatchEvent(ev); | ||
if (this.ownerDocument) { | ||
var ev = this.ownerDocument.createEvent("MutationEvents"); | ||
ev.initMutationEvent("DOMNodeRemoved", true, false, this, null, null, null, null); | ||
oldChild.dispatchEvent(ev); | ||
} | ||
return level1.call(this, oldChild); | ||
@@ -308,0 +310,0 @@ }; |
{ | ||
"name": "jsdom", | ||
"version": "0.1.17", | ||
"version": "0.1.18", | ||
"description": "CommonJS implementation of the DOM intended to be platform independent and as minimal/light as possible while completely adhering to the w3c DOM specifications.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
76449405
132298