diff --git a/Library/0BDFDB.plugin.js b/Library/0BDFDB.plugin.js index 6e576afd4e..7b26b34669 100644 --- a/Library/0BDFDB.plugin.js +++ b/Library/0BDFDB.plugin.js @@ -2,7 +2,7 @@ * @name BDFDB * @author DevilBro * @authorId 278543574059057154 - * @version 3.6.2 + * @version 3.6.3 * @description Required Library for DevilBro's Plugins * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -1525,7 +1525,7 @@ module.exports = (_ => { let eventCallback = null; if (selector) { if (origEventName == "mouseenter" || origEventName == "mouseleave") eventCallback = e => { - for (let child of e.path) if (typeof child.matches == "function" && child.matches(selector) && !child[namespace + "BDFDB" + origEventName]) { + if (e.composedPath) for (let child of e.composedPath()) if (typeof child.matches == "function" && child.matches(selector) && !child[namespace + "BDFDB" + origEventName]) { child[namespace + "BDFDB" + origEventName] = true; if (origEventName == "mouseenter") callback(BDFDB.ListenerUtils.copyEvent(e, child)); let mouseOut = e2 => { @@ -1540,7 +1540,7 @@ module.exports = (_ => { } }; else eventCallback = e => { - for (let child of e.path) if (typeof child.matches == "function" && child.matches(selector)) { + if (e.composedPath) for (let child of e.composedPath()) if (typeof child.matches == "function" && child.matches(selector)) { callback(BDFDB.ListenerUtils.copyEvent(e, child)); break; } @@ -1641,9 +1641,9 @@ module.exports = (_ => { if (!e || !e.constructor || !e.type) return e; let eCopy = new e.constructor(e.type, e); Object.defineProperty(eCopy, "originalEvent", {value: e}); + Object.defineProperty(eCopy, "composedPath", {value: e.composedPath}); Object.defineProperty(eCopy, "which", {value: e.which}); Object.defineProperty(eCopy, "keyCode", {value: e.keyCode}); - Object.defineProperty(eCopy, "path", {value: e.path}); Object.defineProperty(eCopy, "relatedTarget", {value: e.relatedTarget}); Object.defineProperty(eCopy, "srcElement", {value: e.srcElement}); Object.defineProperty(eCopy, "target", {value: e.target});