html - What is shadow root -


in google chrome’s developer tools, see #shadow-root right under <html lang="en"> tag. , used for? don’t see in firefox nor in ie; in chrome, special feature?

if open it, shows <head> , <body> , link beside named reveal, clicking, points <head> , <body>, nothing else.

this special indicator shadow dom exists. these have existed years, developers have never been given apis until recently. chrome has had functionality while, other browsers still catching up. can toggled in devtools settings under "elements" section. uncheck "show user agent shadow dom". @ least hide away shadow doms created internally (like select elements.) unsure right away if affects user-created ones, such custom elements.

these come in things iframes well, have separate dom tree nested inside of another.

the shadow dom saying part of page, has own dom within it. styles , scripting can scoped within element runs in executes in boundary.

this 1 of primary pieces needed web components work. new technology allowing developers build own encapsulated components developers can use other html element.


Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -