Skip to content

Commit 9dd9760

Browse files
TimothyGuaddaleax
authored andcommitted
doc: update url.origin IDNA behavior
Fixes: 413691f "url: expose WHATWG url.origin as ASCII" PR-URL: #14478 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
1 parent 4e2493a commit 9dd9760

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

doc/api/url.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,7 @@ will be thrown.
211211

212212
* {string}
213213

214-
Gets the read-only serialization of the URL's origin. Unicode characters that
215-
may be contained within the hostname will be encoded as-is without [Punycode][]
216-
encoding.
214+
Gets the read-only serialization of the URL's origin.
217215

218216
```js
219217
const { URL } = require('url');
@@ -226,7 +224,7 @@ console.log(myURL.origin);
226224
const { URL } = require('url');
227225
const idnURL = new URL('https://你好你好');
228226
console.log(idnURL.origin);
229-
// Prints https://你好你好
227+
// Prints https://xn--6qqa088eba
230228

231229
console.log(idnURL.hostname);
232230
// Prints xn--6qqa088eba

0 commit comments

Comments
 (0)