- From: Adam Rice <notifications@github.com>
- Date: Fri, 17 Feb 2023 04:08:12 -0800
- To: whatwg/url <url@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 17 February 2023 12:08:25 UTC
It seems you can get much the same functionality by abusing `URL.protocol.host`:
```js
const c = new URL('https://example.com')
c.host = '😀'
'😀'
c.host
'xn--e28h'
c.host = 564
564
c.host
'0.0.2.52'
```
Not that I'd call that a good API, but if the functionality is only needed by a small minority of developers, it might be good enough?
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/pull/288#issuecomment-1434550340
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/url/pull/288/c1434550340@github.com>
Received on Friday, 17 February 2023 12:08:25 UTC