Skip to content

Commit cf65cbd

Browse files
Addressing Copilot feedback
1 parent 672e095 commit cf65cbd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ShadowDOM/explainer.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ The contents of the Declarative CSS Module with `specifier="foo"` (with `color:
412412

413413
### Use with External CSS Files
414414

415-
The `<template>` element's `shadowrootadoptedstylesheets` attribute does not differentiate between specifiers created declaratively (via `<style type="module>`) or external CSS files. This means that the following example is valid:
415+
The `<template>` element's `shadowrootadoptedstylesheets` attribute does not differentiate between specifiers created declaratively (via `<style type="module">`) or external CSS files. This means that the following example is valid:
416416

417417
```html
418418
<my-element>
@@ -429,7 +429,7 @@ This can be handled declaratively with the existing `<link rel="modulepreload">`
429429

430430
However, `<link rel="modulepreload">` does not currently work with CSS Module Scripts. This has been proposed by the WHATWG in [Issue 10233](https://github.com/whatwg/html/issues/10233) and makes sense to prioritize to allow external CSS files to work declaratively with `shadowrootadoptedstylesheets`.
431431

432-
This alone does not make `shadowrootadoptedstylesheets` work well with external files, as `<link rel="modulepreload">` does not perform a synchronous fetch, and if the fetch has not completed by the time `shadowrootadoptedstylesheets`, the styles will not be available in the module map.
432+
This alone does not make `shadowrootadoptedstylesheets` work well with external files, as `<link rel="modulepreload">` does not perform a synchronous fetch, and if the fetch has not completed by the time the `shadowrootadoptedstylesheets` attribute is parsed, the styles will not be available in the module map.
433433

434434
This scenario could be handled by supporting the `blocking` attribute on `<link rel="modulepreload">`, which should be considered for this feature.
435435

0 commit comments

Comments
 (0)