canjs / can-view-import

Import dependencies in CanJS views
https://canjs.com/doc/can-view-import.html
MIT License
3 stars 2 forks source link

document.contains doesn't exist in IE11 #114

Closed phillipskevin closed 5 years ago

phillipskevin commented 5 years ago

This: https://github.com/canjs/can-view-import/blob/18d25ae2c86b5c24020ae1f3e5065265f3097aa9/can-view-import.js#L76-L79

...needs to do what we do everywhere else:

                var removalDisposal = domMutate.onNodeRemoval(element, function () {
                    var doc = element.ownerDocument;
                    var ownerNode = doc.contains ? doc : doc.documentElement;
                    if (!ownerNode || ownerNode.contains(element) === false) {
                        ...
                    }
                });