Intent to Extend Experiment: Beforematch event and hidden-matchable

88 views
Skip to first unread message

Joey Arhar

unread,
Nov 19, 2020, 4:12:00 PM11/19/20
to blink-dev
Original intent to experiment: https://groups.google.com/a/chromium.org/g/blink-dev/c/aTrk7__Eiq4/m/ZWmysi-3BgAJ


Specification


Design docs

https://github.com/WICG/display-locking/blob/master/explainers/hidden-content-explainer.md

Summary

The beforematch event allows developers to display content to the user in response to the following actions: - find-in-page (ctrl+f) - scroll-to-text navigation (example.com/#:~:text=foo) The event is fired at render timing before these actions scroll the page. The event is fired on the element which contains the text, or in the case of fragment navigation, whichever element has the target id.



Blink component

Blink>DOM

TAG review

https://github.com/w3ctag/design-reviews/issues/511

TAG review status

Pending

Risks



Interoperability and Compatibility

Interoperability risks: There are no signals on this feature from firefox or safari yet. We have some tests that use WPT test infrastructure that we can upstream to WPT when the time comes. Compatibility risks: This feature will slightly change the way the scroll-to-text-fragment and find-in-page features work, but since scroll-to-text-fragment is not implemented in other browsers yet, and find-in-page is not specced, this will not cause chrome to diverge in behavior from other browsers. For element fragment scrolling, there are WPTs which make sure the element fragment behavior is not changed by beforematch.



Gecko: No signal

WebKit: No signal

Web developers: No signals

Ergonomics

This API is likely to be used in tandem with display locking AKA content-visibility: https://github.com/WICG/display-locking I don't foresee any performance issues with using beforematch at the moment.



Activation

This feature will benefit from having example code in the explainer repo to show developers how to use it.



Security

I don't have any security considerations for this feature.



Goals for experimentation

Gather developer feedback and get metrics on how often users search for text in hidden-matchable sections which get expanded by beforematch.


Experimental timeline

This original origin trial was M86-M88 inclusive. This extension would include the experiment in M89 and M90, then turn off the origin trial in M91.


Reason this experiment is being extended

We fixed our code to measure what we wanted more correctly and need to extend the origin trial to get the resulting data.

Ongoing technical constraints

None


Debuggability

There are no DevTools features for the scrolling, URL fragment, and event firing impacts that beforematch has.


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

No

Is this feature fully tested by web-platform-tests?

I have ScrollToTextFragment beforematch tests in wpt_internal.

yo...@yoav.ws

unread,
Nov 23, 2020, 3:04:04 AM11/23/20
to blink-dev, Joey Arhar
LGTM to continue experimenting till M90
Reply all
Reply to author
Forward
0 new messages