Intent to Ship: URLPattern: hasRegExpGroups

395 views
Skip to first unread message

Jeremy Roman

unread,
Nov 29, 2023, 9:34:53 PM11/29/23
to blink-dev

Contact emails

jbr...@chromium.org

Explainer

None

Specification

https://urlpattern.spec.whatwg.org/#dom-urlpattern-hasregexpgroups

Summary

Allows easy inspection of whether a URLPattern uses one or more ECMAScript regular expression groups, and therefore may not be suitable for use in cases where an ECMAScript engine is not available (such as some upcoming planned APIs). Strictly speaking this reflects back something developers could know anyway from inspecting the pattern, but having easy access to the UA's implementation of this check makes that more straightforward.



Blink component

Blink>URLPattern

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

Interoperability risk is low. The feature is simple, has a small API surface area, and is easy to implement. It could be polyfilled if other browser vendors implemented URLPattern but not this feature, though that outcome does not seem likely.



Gecko: No signal (https://mozilla.github.io/standards-positions/#urlpattern) This addition is too trivial to request a separate position, but Mozilla is positive on URLPattern generally.

WebKit: No signal (https://webkit.org/standards-positions/#position-61) This addition is too trivial to request a separate position, but WebKit is positive on URLPattern generally.

Web developers: No signals No significant signals, but this feature is trivial

Other signals:

Ergonomics

No significant concerns anticipated



Activation

No; in fact this property is added specifically to make activation of features which can only accept patterns with no regexp groups easier.



Security

No security risks have been identified.



WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



Debuggability

Standard developer tools (e.g., the JavaScript console) are likely to be sufficient. If URL patterns become extremely popular one could imagine tools particular to them, but those could be developed independently of this ship decision.



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

Yes

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

Yes

https://wpt.fyi/results/urlpattern?label=master&label=experimental&aligned&q=urlpattern-hasregexpgroups



Flag name on chrome://flags

None

Finch feature name

URLPatternHasRegExpGroups

Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1504650

Availability expectation

Dependent on implementation of URL Pattern API in non-Chromium browsers.

Estimated milestones

Shipping on desktop122
Shipping on Android122
Shipping on WebView122

If approvals arrive in time for 121 branch, I'll enable this in 121, but I'm currently assuming not.

Anticipated spec changes

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).

None

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/4761338127843328

This intent message was generated by Chrome Platform Status.

Rick Byers

unread,
Dec 5, 2023, 2:24:19 PM12/5/23
to Jeremy Roman, blink-dev
Yeah looks pretty trivial, thanks for the improvement! LGTM1

--
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/CACuR13eBnT2Ee55fE%3DcNw9v%3DoJ9SZ_H4%2B6RKZnUwfsW4W3e%3DGw%40mail.gmail.com.

Mike Taylor

unread,
Dec 5, 2023, 2:42:17 PM12/5/23
to Rick Byers, Jeremy Roman, blink-dev

Yoav Weiss

unread,
Dec 6, 2023, 11:04:10 AM12/6/23
to blink-dev, Jeremy Roman


On Thursday, November 30, 2023 at 3:34:53 AM UTC+1 Jeremy Roman wrote:


Summary

Allows easy inspection of whether a URLPattern uses one or more ECMAScript regular expression groups, and therefore may not be suitable for use in cases where an ECMAScript engine is not available (such as some upcoming planned APIs). Strictly speaking this reflects back something developers could know anyway from inspecting the pattern, but having easy access to the UA's implementation of this check makes that more straightforward.


Would the answer here be different between different implementations?
 


Blink componentBlink>URLPattern

TAG reviewNone

TAG review statusNot applicable
Availability expectationDependent on implementation of URL Pattern API in non-Chromium browsers.


Estimated milestonesShipping on desktop122Shipping on Android122Shipping on WebView122
If approvals arrive in time for 121 branch, I'll enable this in 121, but I'm currently assuming not.

Anticipated spec changes

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).

None

Link to entry on the Chrome Platform Statushttps://chromestatus.com/feature/4761338127843328

Yoav Weiss

unread,
Dec 6, 2023, 11:54:22 AM12/6/23
to blink-dev, Yoav Weiss, Jeremy Roman
LGTM3

On Wednesday, December 6, 2023 at 5:04:10 PM UTC+1 Yoav Weiss wrote:


On Thursday, November 30, 2023 at 3:34:53 AM UTC+1 Jeremy Roman wrote:


Summary

Allows easy inspection of whether a URLPattern uses one or more ECMAScript regular expression groups, and therefore may not be suitable for use in cases where an ECMAScript engine is not available (such as some upcoming planned APIs). Strictly speaking this reflects back something developers could know anyway from inspecting the pattern, but having easy access to the UA's implementation of this check makes that more straightforward.


Would the answer here be different between different implementations?

NM, reading through the spec, I see that the boolean's only dependent on the URLPattern itself. 
Reply all
Reply to author
Forward
0 new messages