From 4f8bc303471f732eb8082a97fb5576914fac18e4 Mon Sep 17 00:00:00 2001 From: Eltrac Date: Mon, 15 Sep 2025 14:25:44 +0800 Subject: refactor: shadow is no longer a child of overlay --- src/shadow.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/shadow.js') 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); + } } -- cgit v1.2.3