mirror of
https://github.com/bitwarden/browser
synced 2026-02-08 20:50:28 +00:00
- Extract magic numbers (500ms, 300ms) to named constants - shadowDomCheckTimeoutMs and shadowDomCheckDebounceMs - Improves maintainability and self-documentation - Add resetObservedShadowRoots() method to DomQueryService - Clears WeakSet tracking when mutation observer is recreated - Called on navigation (handleWindowLocationMutation) - Prevents stale shadow root references - Add real-timer test for debouncing behavior - Uses actual debounce implementation instead of mock - Verifies 5 rapid mutations result in only 1 page update - Validates debouncing works in production timing