Created
April 14, 2013 01:18
-
-
Save csuwildcat/5380931 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*** Option 1 ***/ | |
| <element tagname="x-foo"> | |
| <script> | |
| // By default, the tag name is used to generate the | |
| // named constructor object - without rebinding 'this' | |
| XFooElement.prototype.bar = ... | |
| </script> | |
| </element> | |
| /*** Option 2 ***/ | |
| <element tagname="x-foo" extends="SVGElement" constructor="SuperVG"> | |
| <script> | |
| // By choice, the developer can extend from an existing | |
| // tag using extends="", and/or specify a non-default constructor | |
| // name via constructor="" - again, without rebinding 'this' | |
| SuperVG.prototype.bar = ... | |
| </script> | |
| </element> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment