can-dom-mutate
Advanced tools
Comparing version 2.0.5 to 2.0.6
@@ -18,8 +18,12 @@ var globals = require('can-globals'); | ||
function setIsConnected(doc) { | ||
var node = doc.createTextNode(""); | ||
isConnected = 'isConnected' in node.constructor.prototype ? | ||
getIsConnectedFromNode : | ||
getIsConnectedFromDocument; | ||
if(mutate) { | ||
mutate.isConnected = isConnected; | ||
if(doc) { | ||
var node = doc.createTextNode(""); | ||
isConnected = 'isConnected' in node.constructor.prototype ? | ||
getIsConnectedFromNode : | ||
getIsConnectedFromDocument; | ||
if(mutate) { | ||
mutate.isConnected = isConnected; | ||
} | ||
} else { | ||
mutate.isConnected = getIsConnectedFromNode; | ||
} | ||
@@ -26,0 +30,0 @@ } |
{ | ||
"name": "can-dom-mutate", | ||
"description": "Dispatch and listen for DOM mutations", | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "DoneJS Team", |
@@ -306,2 +306,10 @@ var unit = require('steal-qunit'); | ||
test("Works with no document", function(assert) { | ||
try { | ||
globals.setKeyValue("document", null); | ||
assert.ok(true, "Able to set the document to null like happens in SSR"); | ||
} catch(e) { | ||
assert.ok(false, e.message); | ||
} | ||
}); | ||
} | ||
@@ -308,0 +316,0 @@ |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1804
0
78849
23