Closed Bug 1823354 Opened 1 year ago Closed 11 months ago

Implement URL.canParse()

Categories

(Core :: DOM: Networking, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
115 Branch
Tracking Status
relnote-firefox --- 115+
firefox115 --- fixed

People

(Reporter: annevk, Assigned: canadahonk)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete, parity-safari, Whiteboard: [necko-triaged])

Attachments

(1 file)

Severity: -- → N/A
Priority: -- → P2
Whiteboard: [necko-triaged]
Keywords: dev-doc-needed

Implemented URL.canParse() static function for checking if a URL can be
parsed (instead of having to try wrap the constructor).

Avoids using an ErrorResult/Throws as it is not specified, and for
performance (see spec issue from linked PR).

All WPT tests for it now pass.

Spec PR: https://github.com/whatwg/url/pull/763
WPT tests: https://wpt.fyi/results/url/url-statics-canparse.any.html

Assignee: nobody → oj
Status: NEW → ASSIGNED
Pushed by oj@oojmed.com:
https://hg.mozilla.org/integration/autoland/rev/69cd9d943489
Implement URL.canParse() r=emilio

Backed out for causing wpt failures in /url/idlharness.any.worker.html

Backout link: https://hg.mozilla.org/integration/autoland/rev/e8102aa8a372dee850fbac0e1bcf0157e60ccdec

Push with failures

Failure log ->

Flags: needinfo?(oj)

Sorry, missed some new WPT passes. Fixed.

Flags: needinfo?(oj)
Pushed by oj@oojmed.com:
https://hg.mozilla.org/integration/autoland/rev/1b2f34c70570
Implement URL.canParse() r=emilio
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch

Release Note Request (optional, but appreciated)
[Why is this notable]: New function exposed to all sites (in window)
[Affects Firefox for Android]: Yes
[Suggested wording]: Added the new URL.canParse() function to allow easy and fast checking if URLs are valid and parseable.
[Links (documentation, blog post, etc)]: No docs yet as quite new.

relnote-firefox: --- → ?

Thanks, added a to the Fx115 Nightly release notes. Keeping the relnote? flag open to keep it on the radar for inclusion in our final release notes.

Duplicate of this bug: 1837317

FF115 MDN docs can be tracked in https://github.com/mdn/content/issues/27170.
The work is all done, but in review.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: