- http://html5-demos.appspot.com/static/webcomponents/index.html#1
- http://www.w3.org/TR/2013/WD-components-intro-20130606/
<element name="my-tabs" constructor="TabsController">
<template>
<style>...</style>
<content select="hgroup:first-child"></content>
</template>
<script>
TabsController.prototype = {
doSomething: function() { ... }
};
</script>
</element>
<my-tabs>
<hgroup>
<h2>Title</h2>
...
</hgroup>
</my-tabs>
<script>
var tabs = new TabsController();
tabs.addEventListener('click', function(e) {
e.target.doSomething();
});
document.body.appendChild(tabs);
</script>