Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ If `crossorigin` is set to [`anonymous`](/en-US/docs/Web/HTML/Reference/Attribut
If `crossorigin` is set to [`use-credentials`](/en-US/docs/Web/HTML/Reference/Attributes/crossorigin#use-credentials) then the credentials mode is [`include`](/en-US/docs/Web/API/Request/credentials#include), and user credentials for both single- and cross-origin requests.

The [`as`](/en-US/docs/Web/HTML/Reference/Elements/link#as) attribute is optional for links with `rel="modulepreload"`, and defaults to `"script"`.
It can be set to `"script"` or any script-like destination, such as `"audioworklet"`, `"paintworklet"`, `"serviceworker"`, `"sharedworker"`, or `"worker"`.
It can be set to `"script"`, `"style"`, `"json"`, or any script-like destination, such as `"audioworklet"`, `"paintworklet"`, `"serviceworker"`, `"sharedworker"`, or `"worker"`.
An [`Event`](/en-US/docs/Web/API/Event/Event) named "error" is fired on the element if any other destination is used.

A browser _may_ additionally also choose to automatically fetch any dependencies of the module resource.
Expand Down
8 changes: 7 additions & 1 deletion files/en-us/web/html/reference/elements/link/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ This element includes the [global attributes](/en-US/docs/Web/HTML/Reference/Glo
CSS <code>*-image</code> rules
</td>
</tr>
<tr>
<td>json</td>
<td>
`modulepreload` destinations.
</td>
</tr>
<tr>
<td>object</td>
<td><code>&#x3C;object></code> elements</td>
Expand All @@ -156,7 +162,7 @@ This element includes the [global attributes](/en-US/docs/Web/HTML/Reference/Glo
<td>style</td>
<td>
<code>&#x3C;link rel=stylesheet></code> elements, CSS
<code>@import</code>
<code>@import</code>, and `modulepreload` destinations.
</td>
</tr>
<tr>
Expand Down