Eventcatcher: Fixed FF and IE bugs, added stopPropagation attribute (#5711)

This commit is contained in:
Saq Imtiaz
2021-05-21 09:43:20 +01:00
committed by GitHub
parent 1ddc3ab037
commit 270ead4701
3 changed files with 37 additions and 22 deletions
+4
View File
@@ -22,6 +22,10 @@ exports.domContains = function(a,b) {
!!(a.compareDocumentPosition(b) & 16);
};
exports.domMatchesSelector = function(node,selector) {
return node.matches ? node.matches(selector) : node.msMatchesSelector(selector);
};
exports.removeChildren = function(node) {
while(node.hasChildNodes()) {
node.removeChild(node.firstChild);