top | item 47030346

(no title)

piyh | 14 days ago

Only a single passing mention of web components?

discuss

order

vaylian|14 days ago

> You can use isolated JS scripts, or other approaches like progressively-enhanced web components

How would one use "progressively enchanced" web components? Maybe I misunderstand the intention behind this statement, but web components are either supported or not. There doesn't seem to be some kind of progression.

DrScientist|14 days ago

Given custom elements are pretty widely supported by browsers now, I assume you are referring to js being turned off.

In terms of designing for that situation - you can follow a pattern where your custom element wraps ( <custom-ele><stdelement></></> ) the element you want to enhance. If js is turned off, then the custom element defaults to rendering it's contents....

https://simonwillison.net/2022/Apr/21/web-components-as-prog...