diff --git a/packages/notification/notification.js b/packages/notification/notification.js index c654e6e39c3f937cd8d0d154aecf8d279f875b02..a6a663948569838f6c4091e502bd3667700c6054 100644 --- a/packages/notification/notification.js +++ b/packages/notification/notification.js @@ -21,6 +21,6 @@ module.exports = { detail: options, }); - document.dispatchEvent(event); + window.dispatchEvent(event); }, }; diff --git a/packages/notification/vpu-notification.js b/packages/notification/vpu-notification.js index 900da624c6e0285382b7daa8a432f71e07211e2e..c34d09ebdaae448924f42fbab4df7dcda63a139d 100644 --- a/packages/notification/vpu-notification.js +++ b/packages/notification/vpu-notification.js @@ -26,7 +26,7 @@ class VPUNotification extends VPULitElement { i18n.changeLanguage(this.lang); const that = this; - const listener = document.addEventListener("vpu-notification-send", (e) => { + const listener = window.addEventListener("vpu-notification-send", (e) => { if (typeof e.detail === 'undefined') { return; }