Re: [whatwg/url] Expose a URLHost class to JavaScript (#288)

annevk left a comment (whatwg/url#288)

I don't have a great handle on it. It's not as easy as splitting the string on `:` due to IPv6, which makes me think that it would probably be desirable to have this operation available. Some other schemes that would benefit from having something here include `irc` and `nntp`. I have seen more come by, but I don't remember them.

If you don't want to allow ports you could check for that to be null. So maybe `URLHostAndPort` is indeed the way. It would be nice to avoid having two objects for mostly the same operation.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/pull/288#issuecomment-3352259953
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/url/pull/288/c3352259953@github.com>

Received on Tuesday, 30 September 2025 13:46:57 UTC