Skip to content
Simon Willison·· 8 d ago

Shadow roots, explained with live examples

Shadow roots, explained with live examples

AI summary

An interactive explainer demonstrates shadow DOM style encapsulation, inheritance, slots, parts and JavaScript access, showing how a shadow root creates an isolated DOM tree with private stylesheets and elements, interacting with the page DOM in specific controlled ways. Fable 5.1 Medium generated it from a prompt.

Selection record

Not admittedSum of both 36 < twice the threshold 152

Source tier
Media and individuals; this tier's threshold is 76
Pre-filter
passed:正文含用AI提示构建交互示例

A model scores each item twice, independently, against one written standard, out of 100. An item is admitted only when the two scores add up to twice the threshold. The threshold is set per source tier.

Source: Simon Willison · simonwillison.net