-
Notifications
You must be signed in to change notification settings - Fork 0
Capture sync async with getBoundingClientRect #35
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
Conversation
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.
Pull Request Overview
This PR refactors benchmark test code to improve layout synchronization with iframe content by changing how page layout forcing is handled and how iframe elements are accessed.
- Updated all benchmark test steps to pass specific target elements to the
layout()method instead of forcing layout on the entire page - Refactored iframe element access pattern to use
getContentDocument()and explicit element wrapping - Added async/await synchronization points using
requestAnimationFrameandsetTimeoutto ensure layout operations complete
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| resources/tests.mjs | Updated all benchmark test steps to use targeted layout forcing and new iframe access pattern |
| resources/benchmark-runner.mjs | Modified layout() method to accept target parameter and made wrapElement() public |
| experimental/responsive-design/src/lib/components/information-window.js | Removed unnecessary requestUpdate() call |
| experimental/responsive-design/src/lib/components/chat-window.js | Made chat methods async |
| experimental/responsive-design/src/lib/components/chat-input.js | Removed event bubbling properties |
| experimental/responsive-design/src/lib/components/app-ribbon.js | Optimized resize handling to avoid unnecessary updates |
|
@lpardosixtosMs do you mind taking a look at tests.mjs please. |
…e for improved readability
* Refactor layout method to accept target element for improved flexibility * refactor: simplify layout method by using logical OR for body assignment * refactor: replace magic numbers with named constants for media query breakpoints * refactor: replace repeated calls to getContentDocument with a variable for improved readability
Uh oh!
There was an error while loading. Please reload this page.