4 main areas (Shadow DOM gives encapsulation, templates or chunk of markup that later you can stamp out your elements, custom tags, html imports that can be reused via CDN URLs):
HTML templates:
Template out your markup
Template out your markup
Put dom in it
Parsed not rendered
- won't run until you stamp it out, same for media
Hidden from
document, cant traverse into, its in its own context
Content property -
document fragment , clone it, stamp it out, see whats in it
Example:
Clone it is what stamps it out (here it runs script when that happens):
New spec for html templates : chrome supports it.
Shadow dom (Secret markup in
elements):
markup encapsulation, DOM encapsulation, css style boundary protection, no bleeding in, style boundaries, exposes to developers mechanics browser vendors use to create their html elements
iframe has it but bloated, hard to use (extra network requests needed, multiple rendering contexts)
iframe has it but bloated, hard to use (extra network requests needed, multiple rendering contexts)
Dom nodes can host
hidden dom
hidden
dom can't be accessed by outside javscript
Show shadow dom in
web tools under wrench:
Hidden document
fragment
Using markup to
control it
Browser vendors been
holding out
Filled in markup
Shadow dom gets
rendered
Style things
This time add
styling make it red
@host
Host element provide
default styles
Custom elements (require hyphen)
Using js
html.prototype
Html imports
No comments:
Post a Comment