← Back to release summary

URLPattern: hasRegExpGroups

Category
Miscellaneous
Type
Chromium catches up
Status
Enabled by default (Chrome 122)
Intent stage
None

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.

Standards & signals

View on chromestatus.com