Skip to content

Commit 89f1604

Browse files
committed
minor
1 parent d1c2c4c commit 89f1604

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

1-js/13-modules/01-modules-intro/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ There are two notable differences of external module scripts:
296296
<script type="module" src="my.js"></script>
297297
```
298298
299-
2. External scripts that are fetched from another domain require [CORS](mdn:Web/HTTP/CORS) headers. In other words, if a module script is fetched from another domain, the remote server must supply a header `Access-Control-Allow-Origin: *` (may use fetching domain instead of `*`) to indicate that the fetch is allowed.
299+
2. External scripts that are fetched from another origin (e.g. another site) require [CORS](mdn:Web/HTTP/CORS) headers, as described in the chapter <info:fetch-crossorigin>. In other words, if a module script is fetched from another origin, the remote server must supply a header `Access-Control-Allow-Origin: *` (may use site domain instead of `*`) to indicate that the fetch is allowed.
300300
```html
301301
<!-- another-site.com must supply Access-Control-Allow-Origin -->
302302
<!-- otherwise, the script won't execute -->

1-js/13-modules/02-import-export/article.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,15 @@ For instance, these are all perfectly valid default exports:
209209
export default class { // no class name
210210
constructor() { ... }
211211
}
212+
```
212213

214+
```js
213215
export default function(user) { // no function name
214216
alert(`Hello, ${user}!`);
215217
}
218+
```
216219

220+
```js
217221
// export a single value, without making a variable
218222
export default ['Jan', 'Feb', 'Mar','Apr', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
219223
```

0 commit comments

Comments
 (0)