aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/observe-dom.ts
diff options
context:
space:
mode:
authorArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2023-03-25 09:21:11 +0530
committerArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2023-03-25 09:36:24 +0530
commitd6682a1ed9acd31dbfdb9e645cc8230c61a268c3 (patch)
tree63c5577b701c377896f4aa2985adf67f7aa3d679 /src/utils/observe-dom.ts
parentfeac7acb91a78b117241abdd0a5d80f778e15f06 (diff)
downloadbanglar-bhumi-utils-d6682a1ed9acd31dbfdb9e645cc8230c61a268c3.tar.gz
banglar-bhumi-utils-d6682a1ed9acd31dbfdb9e645cc8230c61a268c3.zip
Disable minification in development.
Diffstat (limited to 'src/utils/observe-dom.ts')
-rw-r--r--src/utils/observe-dom.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/observe-dom.ts b/src/utils/observe-dom.ts
index 8ea1a98..4a447a0 100644
--- a/src/utils/observe-dom.ts
+++ b/src/utils/observe-dom.ts
@@ -1,11 +1,11 @@
-export const observeDOM = (callback: () => boolean, element: HTMLElement = document as unknown as HTMLElement) => {
+export const observeDOM = (callback: () => boolean) => {
const observer = new MutationObserver(() => {
if (callback()) {
observer.disconnect();
}
});
- observer.observe(element, {
+ observer.observe(document, {
childList: true,
subtree: true
});