<canvas height="30"> <class name="mybutton" extends="button">
<attribute name="myattr" type="string" value="after
"/> </class> <mybutton text="before" onclick="setAttribute('text', this.myattr)">
<attribute name="myattr" value="perhaps later
"/> </mybutton> </canvas>