Integrate with the move event for window defined by CSSOM-View #10853
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.
UAs expose the coordinates of a window (window.screenX, window.screenY), enabling authors to track window movement and react to it. Without a corresponding event though, they have to resort to active polling, which is wasteful of resources, especially if done often enough to have a responsive UI.
As resolved by the CSSWG (See w3c/csswg-drafts#7693), this adds an onmove event handler to keep track changes in window position without such need for active polling. The definition of the event itself goes to CSSOM-View, along with the geometric attributes whose changes it tracks.
The privacy concerns related to exposing the window position in the first place are handled in CSSOM-View, which allows UAs to return fake information. The addition of the event doesn't change that: UAs that don't expose the real information continue not to (and the event won't fire).
See explainer at https://github.com/Igalia/explainers/blob/main/onmove-event-handler/README.md
CSS Part of the change: w3c/csswg-drafts#11278
Tests: web-platform-tests/wpt#49390
Implemented experimentally in Chrome: https://chromium-review.googlesource.com/c/chromium/src/+/6035050
(See WHATWG Working Mode: Changes for more details.)
/acknowledgements.html ( diff )
/indices.html ( diff )
/infrastructure.html ( diff )
/sections.html ( diff )
/webappapis.html ( diff )