aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/observe-dom.ts
diff options
context:
space:
mode:
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
});