Skip to content

Commit ad6c8d2

Browse files
jiangying000github-actions[bot]dipikabh
authored
Fix variable redeclaration in url.origin code example (mdn#40529)
* Update index.md * Update index.md * Update files/en-us/web/api/url/origin/index.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update files/en-us/web/api/url/origin/index.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * add prose for examples --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Dipika Bhattacharya <dipika@foss-community.org>
1 parent 89835e4 commit ad6c8d2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

files/en-us/web/api/url/origin/index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,19 @@ A string.
2424

2525
## Examples
2626

27+
The following examples show how the `origin` property is computed for a `blob:` URL, an `http:` URL, and one using a non-default port:
28+
2729
```js
2830
const url = new URL("blob:https://mozilla.org:443/");
2931
console.log(url.origin); // 'https://mozilla.org'
32+
```
3033

34+
```js
3135
const url = new URL("http://localhost:80/");
3236
console.log(url.origin); // 'http://localhost'
37+
```
3338

39+
```js
3440
const url = new URL("https://mozilla.org:8080/");
3541
console.log(url.origin); // 'https://mozilla.org:8080'
3642
```

0 commit comments

Comments
 (0)