Skip to content

Commit

Permalink
doc: update url.origin IDNA behavior
Browse files Browse the repository at this point in the history
Fixes: 413691f "url: expose WHATWG url.origin as ASCII"
PR-URL: #14478
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
  • Loading branch information
TimothyGu authored and addaleax committed Aug 1, 2017
1 parent 4e2493a commit 9dd9760
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions doc/api/url.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,7 @@ will be thrown.

* {string}

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

```js
const { URL } = require('url');
Expand All @@ -226,7 +224,7 @@ console.log(myURL.origin);
const { URL } = require('url');
const idnURL = new URL('https://你好你好');
console.log(idnURL.origin);
// Prints https://你好你好
// Prints https://xn--6qqa088eba

console.log(idnURL.hostname);
// Prints xn--6qqa088eba
Expand Down

0 comments on commit 9dd9760

Please sign in to comment.