fix(hackbrowser): wait for DOM quiescence to capture timer-mounted content - #130
Open
lorenzozanee wants to merge 1 commit into
Open
Conversation
…ntent The crawler's stabilizeAfterGoto only waited for networkidle, so content injected via setTimeout (no network activity) was missed when the scan ran before the timer fired. Add a bounded DOM-mutation quiescence wait (quiet 600ms, timeout 5000ms) that covers the 4.5s synthetic repro while costing only ~600ms on stable pages and capping continuous-mutation pages. Closes CyberStrikeus#103.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes #103.
networkidlemisses content mounted bysetTimeoutwith no network activity, so the scan finishes before timer-driven widgets appear. This adds a bounded DOM quiescence wait (quiet 600 ms, timeout 5 s) to the post-navigation settle step; stable pages add ~600 ms and the 4.5 s repro is now captured. The transient-UI auto-close gap was already fixed onmainby01647a5a.Type of change
Security impact
How did you verify it works?
Synthetic localhost page that appends a button after 4.5 s — before the fix the scan never saw it, after it is found. Existing hackbrowser unit tests still pass.
Checklist
bun turbo typecheckpassesReviewers: @badchars