Skip to content

Commit 73d5c64

Browse files
fix: update crossOrigin description to clarify requirement when using as="fetch"
1 parent ecf7596 commit 73d5c64

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/content/reference/react-dom/preinitModule.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ The `preinitModule` function provides the browser with a hint that it should sta
4747
* `href`: a string. The URL of the module you want to download and execute.
4848
* `options`: an object. It contains the following properties:
4949
* `as`: a required string. It must be `'script'`.
50-
* `crossOrigin`: a string. The [CORS policy](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin) to use. Its possible values are `anonymous` and `use-credentials`.
50+
* `crossOrigin`: a string. The [CORS policy](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin) to use. Its possible values are `anonymous` and `use-credentials`. It is required when `as` is set to `"fetch"`.
5151
* `integrity`: a string. A cryptographic hash of the module, to [verify its authenticity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity).
5252
* `nonce`: a string. A cryptographic [nonce to allow the module](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/nonce) when using a strict Content Security Policy.
5353

src/content/reference/react-dom/preloadModule.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ The `preloadModule` function provides the browser with a hint that it should sta
4747
* `href`: a string. The URL of the module you want to download.
4848
* `options`: an object. It contains the following properties:
4949
* `as`: a required string. It must be `'script'`.
50-
* `crossOrigin`: a string. The [CORS policy](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin) to use. Its possible values are `anonymous` and `use-credentials`.
50+
* `crossOrigin`: a string. The [CORS policy](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin) to use. Its possible values are `anonymous` and `use-credentials`. It is required when `as` is set to `"fetch"`.
5151
* `integrity`: a string. A cryptographic hash of the module, to [verify its authenticity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity).
5252
* `nonce`: a string. A cryptographic [nonce to allow the module](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/nonce) when using a strict Content Security Policy.
5353

0 commit comments

Comments
 (0)