Вы можете попытаться проверить, может ли это заполнение помочь заполнить путь.
// Event.composedPath
(function(e, d, w) {
if(!e.composedPath) {
e.composedPath = function() {
if (this.path) {
return this.path;
}
var target = this.target;
this.path = [];
while (target.parentNode !== null) {
this.path.push(target);
target = target.parentNode;
}
this.path.push(d, w);
return this.path;
}
}
})(Event.prototype, document, window);
используйте его, как показано ниже:
var path = event.path || (event.composedPath && event.composedPath());
Ссылки:
(1) event.path не определен с помощью Firefox и Vue.js
(2) rockinghelvetica / mixedpath.polyfill.js
Кроме того, что я сделалнет альтернативы или обходного пути, чтобы получить Event.Composedpath для браузеров IE и Edge.