<element name="a-bar" constructor="ABar">
<section>Hello World</section>
<script>
var section = this.querySelector('section');
this.register({
prototype: {
readyCallback: function() {
this.textContent = section.textContent;
},
bar: function() { alert('bar() is called'); }
}
});
</script>
</element>