1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-12-09 02:08:05 +00:00

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

This commit is contained in:
Saq Imtiaz
2021-05-21 10:43:20 +02:00
committed by GitHub
parent 1ddc3ab037
commit 270ead4701
3 changed files with 37 additions and 22 deletions

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);