Browse Source

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>
v7.x
Richard Lau 8 years ago
committed by Anna Henningsen
parent
commit
3e79dffd2c
No known key found for this signature in database GPG Key ID: D8B9F5AEAE84E4CF
  1. 2
      doc/api/url.md

2
doc/api/url.md

@ -599,7 +599,7 @@ Gets and sets the protocol portion of the URL.
```js
const myURL = new URL('https://example.org');
console.log(myURL.protocol);
// Prints http:
// Prints https:
myURL.protocol = 'ftp';
console.log(myURL.href);

Loading…
Cancel
Save