Skip to content

Commit

Permalink
fix: update load to DOMContentLoaded event for page view
Browse files Browse the repository at this point in the history
  • Loading branch information
ayan-bloomscorp committed May 8, 2024
1 parent 0805ae4 commit 178fe3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/event/page-view-event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ let _hasInitialPageViewOccurred: boolean = false;
let _debounce: boolean = false;

export function initPageViewEventHandler(): void {
resolveWindow()?.addEventListener("load", () => pageViewObserver());
resolveWindow()?.addEventListener("DOMContentLoaded", () => pageViewObserver());
}

export function pageViewObserver(): void {
Expand Down

0 comments on commit 178fe3a

Please sign in to comment.