summaryrefslogtreecommitdiff
path: root/src/shadow.js
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-09-15 14:25:44 +0800
committerEltrac <hi@guhub.cn>2025-09-15 14:25:44 +0800
commit4f8bc303471f732eb8082a97fb5576914fac18e4 (patch)
treefd0b427b3f9f77942bca23f6a9ffcaaa657e7921 /src/shadow.js
parentb0c616f123830c0623765e91dd3a71de8328b647 (diff)
refactor: shadow is no longer a child of overlay
Diffstat (limited to 'src/shadow.js')
-rw-r--r--src/shadow.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/shadow.js b/src/shadow.js
index 57a5cd6..973125c 100644
--- a/src/shadow.js
+++ b/src/shadow.js
@@ -123,4 +123,13 @@ export default class Shadow {
// Start the animation
requestAnimationFrame(frame);
}
+
+ placeItself() {
+ document.body.appendChild(this.element);
+ }
+
+ destroyItself() {
+ if (!document.body.contains(this.element)) return;
+ document.body.removeChild(this.element);
+ }
}