var tabs = document.createElement('my-tabs'); var tab1 = document.createElement('my-tab'); var tab2 = document.createElement('my-tab'); var tab3 = document.createElement('my-tab'); tabs.appendChild(tab1); tabs.appendChild(tab2); tabs.appendChild(tab3); tab1.setAttribute('selected', true);
![Web Components / Shadow DOM](https://cdn-ak-scissors.b.st-hatena.com/image/square/52e89e672f29355dc805fdbd346c2f8076e9f9c3/height=288;version=1;width=512/http%3A%2F%2Fhayatoito.github.io%2Fwebcomponents-slides%2Fimages%2Fpolymer%2Farchitecture-diagram.png)