summaryrefslogtreecommitdiff
path: root/ext/client.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/client.js')
-rw-r--r--ext/client.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/client.js b/ext/client.js
index 2d9a470f..1c8c0a9f 100644
--- a/ext/client.js
+++ b/ext/client.js
@@ -27,7 +27,9 @@ class Client {
this.popup.classList.add('yomichan-popup');
this.popup.addEventListener('mousedown', (e) => e.stopPropagation());
this.popup.addEventListener('scroll', (e) => e.stopPropagation());
- document.body.appendChild(this.popup);
+
+ const base = document.body.appendChild('div');
+ base.createShadowRoot().appendChild(this.popup);
chrome.runtime.onMessage.addListener(this.onMessage.bind(this));
window.addEventListener('mousedown', this.onMouseDown.bind(this));