-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
feat(audits): Handle mutations #10268
Conversation
🦋 Changeset detectedLatest commit: 0260942 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is blocked because it contains a minor
changeset. A reviewer will merge this at the next release if approved.
packages/astro/src/runtime/client/dev-toolbar/apps/audit/index.ts
Outdated
Show resolved
Hide resolved
@ematipico Added comments explaining the points you were confused about! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you Erika! Looks good to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs approval!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is blocked because it contains a minor
changeset. A reviewer will merge this at the next release if approved.
Changes
Set up a MutationObserver to rerun auditing the page after changes. There's a bunch of perf concerns here for sure, but according to Google, in 2024 MutationObserver's performance isn't that bad? Also, I tried to set up a bunch of reasonable timeouts.
Note that this does not handle images and iframes that haven't loaded yet, that requires a bit more changes.
Testing
Added a bunch of tests, that was the most complicated part of this PR.
Docs
N/A