🏠 New in High Baseline Support: URL.canParse()
June 7, 2026
The URL.canParse() static method checks whether a URL can be parsed into a valid URL object. It’s an alternative to calling new URL() in a try … catch statement.
Source features
api.URL.canParse_static[mdn]