doc: fix url example to match behavior
Fixes one WHATWG URL example to match the actual behavior. PR-URL: https://github.com/nodejs/node/pull/23359 Fixes: https://github.com/nodejs/node/issues/22653 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
0311fcc546
commit
3b1baf6372
@ -1286,7 +1286,7 @@ const myURL = new URL('https://%CF%80.example.com/foo');
|
|||||||
console.log(myURL.href);
|
console.log(myURL.href);
|
||||||
// Prints https://xn--1xa.example.com/foo
|
// Prints https://xn--1xa.example.com/foo
|
||||||
console.log(myURL.origin);
|
console.log(myURL.origin);
|
||||||
// Prints https://π.example.com
|
// Prints https://xn--1xa.example.com
|
||||||
```
|
```
|
||||||
|
|
||||||
[`Error`]: errors.html#errors_class_error
|
[`Error`]: errors.html#errors_class_error
|
||||||
|
Loading…
x
Reference in New Issue
Block a user