Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Ensure pages loaded in the foreground tab are monitored for changes #460

Merged
merged 3 commits into from
Nov 30, 2021

Conversation

matatk
Copy link
Owner

@matatk matatk commented Nov 29, 2021

PR #428 introduced a bug whereby the MutationObserver wouldn't be wired up until the page became visible (i.e. either the user moves to it for the first time, if it was loaded in a background tab, or the user moves away from and back to it, if it was loaded in the foreground tab). This was discovered and reported by @cbou in #458.

Fixes #458

* Have a fallback to the standard scanner.
* Only call observeMutations() at start-up if the document is visible
  (as opposed to calling it every time we get a `devtools-state`
  message).
* Remove some surplus debugging info (this removes some effectively
  double announcements, also some announcements where things are known
  to be working absolutely fine).
@matatk matatk changed the title fix: Ensure the MutationObserver is used on initial load fix: Ensure pages loaded in the foreground tab are monitored for changes Nov 30, 2021
@matatk matatk merged commit 9216a38 into main Nov 30, 2021
@matatk matatk deleted the fix-not-observing branch November 30, 2021 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mutation Observer does not seems to work correctly
1 participant