From 589602a30cac1409856f74aaf17d4d280cd59c9c Mon Sep 17 00:00:00 2001 From: Patrizio Bekerle <patrizio.bekerle@tugraz.at> Date: Fri, 26 Jul 2019 09:55:40 +0200 Subject: [PATCH] Switch from document to window for events --- packages/notification/notification.js | 2 +- packages/notification/vpu-notification.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/notification/notification.js b/packages/notification/notification.js index c654e6e3..a6a66394 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 900da624..c34d09eb 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; } -- GitLab