WEB COMPONENTS
The term "web components" refers to a handful of tools designed to enhance DOM behavior: shadow DOM, custom elements, and HTML templates. This collection of browser APIs is particularly messy:
- There is no single "Web Components" specification: each web component is defined in a different specification.
- Several web components, such as shadow DOM and custom elements, have undergone backwards-incompatible versioning.
- Adoption across browser vendors is extremely inconsistent.
Because of these issues, adopting web components often demands a web component library, such as Polymer (https://www.polymer-project.org/
), to polyfill and emulate missing web components in the browser.
HTML Templates
Before web components, there wasn't a particularly good way of writing HTML that would allow the browser to build a DOM subtree from parsed HTML but decline to render...