Skip to content

Commit bc5e545

Browse files
committed
Use documentElement.contains()
1 parent 20b575c commit bc5e545

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/attrs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ live.attrs = function(el, compute, scope, options) {
9797
};
9898
// unbind on element removal
9999
removalDisposal = domMutate.onNodeRemoval(el, function () {
100-
if (!el.ownerDocument.contains(el)) {
100+
if (!el.ownerDocument.documentElement.contains(el)) {
101101
teardownHandler();
102102
}
103103
});

lib/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ var live = {
6565
}
6666
};
6767
removalDisposal = domMutate.onNodeRemoval(el, function () {
68-
if (!el.ownerDocument.contains(el)) {
68+
if (!el.ownerDocument.documentElement.contains(el)) {
6969
teardown();
7070
}
7171
});

0 commit comments

Comments
 (0)