Comment

Comment by captain_crabs

See shadow dom section in here: https://github.com/w3c/webcomponents/ which specified most of docs are maintained in here: https://dom.spec.whatwg.org/

And as for what it is, you know how a given web page has global css/query selector scope? Shadow dom is like a membrane in there, where styles and other things don't go in (unless you explicitly poke a hole). It's like a whole new document that you can nest inside an existing document. It's encapsulation inside browsers

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton