Update 0BDFDB.plugin.js
This commit is contained in:
parent
5addaae42b
commit
2e3efda1f5
|
@ -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});
|
||||
|
|
Loading…
Reference in New Issue