This feature is not to fire selectionchange event when there is already one pending. For web developers, selectionchange event listeners will be called less often with this feature. Before this feature, every time the mutation of the selection on one target(input/textarea/document) would make the listener to be called once.
Now with this feature, before the selectionchange event listner is finally called, multiple mutations of the selection on one target would make the listener to be called only once.
Interoperability risk is low because Firefox and Safari have shipped this according to the specification. It has none compatibility risk since this is nor a removal. W3C spec for this feature: https://w3c.github.io/selection-api/#scheduling-selectionhange-event
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
Low WebView application risks.
None
Some related WPT tests results have been updated in our commit.
Commit url:
https://chromium-review.googlesource.com/c/chromium/src/+/5494116
Related wpt tests(all passed in the try job):
*third_party/blink/web_tests/external/wpt/selection/onselectionchange-on-distinct-text-controls.html
*third_party/blink/web_tests/external/wpt/selection/onselectionchange-on-document.html
*third_party/blink/web_tests/external/wpt/selection/onselectionchange-on-document.html
*third_party/blink/web_tests/external/wpt/selection/textcontrols/selectionchange.html
*third_party/blink/web_tests/external/wpt/selection/textcontrols/selectionchange-on-shadow-dom.html
*third_party/blink/web_tests/fast/events/selectionchange-iframe.html
On latest wpt.fyi, the tests are all passed, see:
Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).
NoneContact emailsshuangsh...@intel.com
ExplainerNone
Specificationhttps://w3c.github.io/selection-api/#scheduling-selectionhange-event
SummaryThis feature is not to fire selectionchange event when there is already one pending. For web developers, selectionchange event listeners will be called less often with this feature. Before this feature, every time the mutation of the selection on one target(input/textarea/document) would make the listener to be called once.
Now with this feature, before the selectionchange event listner is finally called, multiple mutations of the selection on one target would make the listener to be called only once.
Blink componentBlink>Editing>Selection
TAG reviewNone
TAG review statusIssues addressed
Risks
Interoperability and CompatibilityInteroperability risk is low because Firefox and Safari have shipped this according to the specification. It has none compatibility risk since this is nor a removal. W3C spec for this feature: https://w3c.github.io/selection-api/#scheduling-selectionhange-event
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/58462a23-205f-471c-aaf1-b2493d4ee471n%40chromium.org.