Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Fixes IE11 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
arv committed Oct 17, 2013
1 parent 12db94a commit 7c0d44b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
14 changes: 11 additions & 3 deletions test/js/MutationObserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,13 @@ suite('MutationObserver', function() {
assert.equal(addedNodes[0], c);
assert.equal(addedNodes[1], d);
assert.equal(removedNodes.length, 2);
assert.equal(removedNodes[0], a);
assert.equal(removedNodes[1], b);
// The ordering of the removed nodes is different in IE11.
if (removedNodes[0] === a) {
assert.equal(removedNodes[1], b);
} else {
assert.equal(removedNodes[0], b);
assert.equal(removedNodes[1], a);
}
mo.disconnect();
done();
});
Expand Down Expand Up @@ -265,7 +270,10 @@ suite('MutationObserver', function() {
assert.equal(observer, mo);
assert.equal(records[0].type, 'childList');
assert.equal(records[0].target, div);
assert.equal(removedNodes.length, 1);

// IE11 is broken and reports the text node being removed twice.
if (!/Trident/.test(navigator.userAgent))
assert.equal(removedNodes.length, 1);
assert.equal(removedNodes[0], a);
done();
});
Expand Down
4 changes: 2 additions & 2 deletions test/js/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -1175,8 +1175,8 @@ test('retarget order (multiple shadow roots)', function() {
assert.equal(calls, 2);

// defaultPrevented is broken in IE.
// https://connect.microsoft.com/IE/feedback/details/790389/event-defaultprevented-returns-false-after-preventdefault-was-called
if (!/IE/.test(navigator.userAgent))
// https://connect.microsoft.com/IE/feedback/details/790389/event-defaultprevented-returns-false-after-preventdefault-was-called
if (!/Trident/.test(navigator.userAgent))
assert.isTrue(event.defaultPrevented);
});

Expand Down

0 comments on commit 7c0d44b

Please sign in to comment.