Releases: canjs/can-dom-mutate
Work around IE11 contains() that does not recognize text nodes
Fixes document test to reset
This fixes a test that broke any tests that might run after the "no document" test.
Fix running in SSR
This is a fix for SSR, in the case where done-ssr will remove the document.
Fix setting of SVG attributes
Change to use node.setAttributeNS for SVG attributes.
Fix setting of SVG attributes
Change to use node.setAttributeNS
for SVG attributes.
Note: On GitHub 1.3.11 is identical to 1.3.10. However 1.3.10 was accidentally published to NPM without including this change, so we could not replace it and instead made this new release that includes the change.
Fixes race condition in tests
Race condition was caused by can-globals MutationObserver
being turned off in the tests. This restores the listener for that.
onNodeRemoved and onNodeInserted
This adds an onNodeRemoved
and an onNodeInserted
element that let you listen to when an element is removed from any parent or inserted into any parent. By any parent, we mean this works from parents that are in the document (connected) and not in the document. Although you must use domMutateNode
for elements that are disconnected.
Let's break this down.
The following works:
var div = document.createElement("div");
// CONNECTED
document.body.append(div);
domMutate.onNodeRemoved( div , function(){
// CALLED!
});
div.remove();
The following works too:
// DISCONNECTED
var div = document.createElement("div");
domMutate.onNodeRemoved( div , function(){
// CALLED!
});
// USE domMutateNode
domMutateNode.removeChild.call(document.body, div );
The following does not work
// DISCONNECTED
var div = document.createElement("div");
domMutate.onNodeRemoved( div , function(){
// NOT CALLED!
});
div.remove();
This is NOT a breaking change, but it might affect your application's performance, so it is in a major release.
QUNIT2 upgrade
This updates the tests to use [email protected].
Document dom-events.js
Fix #31:
-
Move
node.js
tonode/node.js
-
Move
dom-events.js
toevents/events.js
-
Document
events/events.js