From d074b2f427165024984c81fb12166696362b0b86 Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Fri, 23 Jun 2017 08:51:44 +0800 Subject: [PATCH] doc: update url.origin IDNA behavior MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: 413691fde0 "url: expose WHATWG url.origin as ASCII" PR-URL: https://github.com/nodejs/node/pull/14478 Reviewed-By: James M Snell Reviewed-By: Vse Mozhet Byt Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Tobias Nießen --- doc/api/url.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/doc/api/url.md b/doc/api/url.md index bdb04a23dd..a4fe496ba0 100644 --- a/doc/api/url.md +++ b/doc/api/url.md @@ -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'); @@ -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