<input type="text"></input>
What is a web component ?
<video width="320" height="240" controls="" data-paused-by-reveal="">
<source src="https://www.dropbox.com/s/rnmumqc7k811i1p/IMG_7054.MOV?dl=1 " type="video/mp4">
</video>
class AppDrawer extends HTMLElement {...}
window.customElements.define('app-drawer', AppDrawer);
// Or use an anonymous class if you don't want a named constructor in current scope.
window.customElements.define('app-drawer', class extends HTMLElement {...});
<app-drawer></app-drawer>
customElements.define('fancy-tabs', class extends HTMLElement {
constructor() {
super(); // always call super() first in the ctor.
// Attach a shadow root to <fancy-tabs>.
const shadowRoot = this.attachShadow({mode: 'open'});
shadowRoot.innerHTML = `
<style>#tabs { ... }</style> <!-- styles are scoped to fancy-tabs! -->
<div id="tabs">...</div>
<div id="panels">...</div>
`;
}
...
});
<template id="mytemplate">
<img src="" alt="great image">
<div class="comment"></div>
</template>
<template is="dom-repeat" items="{{employees}}">
<div>First name: <span>{{item.first}}</span></div>
<div>Last name: <span>{{item.last}}</span></div>
<p></p>
</template>
1. Global Namespace
2. Browser Support
3. Community
4. Limited programming model