Skip to content

Releases: canjs/can-dom-mutate

Work around IE11 contains() that does not recognize text nodes

06 Jan 18:29
Compare
Choose a tag to compare

Fixes document test to reset

17 Oct 16:26
Compare
Choose a tag to compare

This fixes a test that broke any tests that might run after the "no document" test.

Fix running in SSR

17 Oct 16:27
Compare
Choose a tag to compare

This is a fix for SSR, in the case where done-ssr will remove the document.

Fix setting of SVG attributes

07 Aug 20:49
Compare
Choose a tag to compare

Change to use node.setAttributeNS for SVG attributes.

Fix setting of SVG attributes

07 Aug 20:48
Compare
Choose a tag to compare

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

01 Aug 16:53
Compare
Choose a tag to compare

Race condition was caused by can-globals MutationObserver being turned off in the tests. This restores the listener for that.

onNodeRemoved and onNodeInserted

08 Jun 01:11
Compare
Choose a tag to compare

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

28 May 18:22
Compare
Choose a tag to compare

This updates the tests to use QUnit@2.x.x.

#56

Document dom-events.js

04 Dec 18:05
Compare
Choose a tag to compare

Fix #31:

  • Move node.js to node/node.js

  • Move dom-events.js to events/events.js

  • Document events/events.js

Another fix for IE11

08 Nov 23:31
Compare
Choose a tag to compare