url: expose WHATWG url.origin as ASCII#13126
Conversation
| const unicodeHost = unicode ? domainToUnicode(host) : host; | ||
| return `${scheme}//${unicodeHost}${port === null ? '' : `:${port}`}`; | ||
| // Refs: https://html.spec.whatwg.org/multipage/browsers.html#ascii-serialisation-of-an-origin | ||
| function serializeTupleOrigin(scheme, host, port) { |
There was a problem hiding this comment.
Maybe keep https://html.spec.whatwg.org/multipage/browsers.html#unicode-serialisation-of-an-origin or quote the Note: There used to also be a Unicode serialization of an origin. However, it was never widely adopted.
There was a problem hiding this comment.
Is there a need to? This function is purely internal, and there is no remnant from the previous Unicode serialization that needs explanation.
There was a problem hiding this comment.
Since the standard kept a "there was something here", I thought we could emulate.
But I yield to your decision.
jasnell
left a comment
There was a problem hiding this comment.
Lgtm. This part was always a bit sketchy to me since I knew browsers weren't consistent. Glad to see this fixed
|
Landed in 413691f. |
PR-URL: #13126 Refs: whatwg/url#297 Refs: web-platform-tests/wpt#5944 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
PR-URL: #13126 Refs: whatwg/url#297 Refs: web-platform-tests/wpt#5944 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
PR-URL: #13126 Refs: whatwg/url#297 Refs: web-platform-tests/wpt#5944 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
Fixes: 413691f "url: expose WHATWG url.origin as ASCII" Refs: nodejs#13126
Refs: whatwg/url#297
Refs: web-platform-tests/wpt#5944
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
url