doc: fix WHATWG URL url.protocol example
Protocol of `https://example.org` is `https:` not `http:`. PR-URL: https://github.com/nodejs/node/pull/11647 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
5269e952a1
commit
bb5c84a1a7
@ -599,7 +599,7 @@ Gets and sets the protocol portion of the URL.
|
|||||||
```js
|
```js
|
||||||
const myURL = new URL('https://example.org');
|
const myURL = new URL('https://example.org');
|
||||||
console.log(myURL.protocol);
|
console.log(myURL.protocol);
|
||||||
// Prints http:
|
// Prints https:
|
||||||
|
|
||||||
myURL.protocol = 'ftp';
|
myURL.protocol = 'ftp';
|
||||||
console.log(myURL.href);
|
console.log(myURL.href);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user