-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Remove measuring APIs from the runtime #31540
Comments
|
Correct. The only reason I'm setting up the experiment is to allow the ResizeObserver polyfill to be worked on independently. Also,
Two reasons:
|
I just did a survey of the various usages. By my count there are ~18 instances that an be replaced via Some thoughts:
Full notesResizeObserver cases.
A4A
AmpAd
layoutCallback InOb Rect
One-offs (needs boundingClientRect + not in layoutCallback)
IntersectionObserver
Other
|
Proposed plan:
layoutCallback(size)
.ResizeObserver
.getLayoutBox
and related APIs should be phased out. Many uses are currently incorrect or imprecise. We could instead add onegetSize
-style API, but we should call it clearly to explain that this is the size at the last load/layout operation and has no guarantees on freshness.TODO:
layoutCallback
as a transaction argument value.BaseElement.onMeasureChanged
(the clearest indication of resize tracking functionality).getPageLayoutBox
API.getLayoutBox
API.getIntersectionChangeEntry
API.getIntersectionElementLayoutBox
API.getLayoutWidth
API.The text was updated successfully, but these errors were encountered: