Created
April 10, 2013 20:12
-
-
Save csuwildcat/5358025 to your computer and use it in GitHub Desktop.
This file contains 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
/*** Method 1 ***/ | |
<element tagname="x-foo"> | |
<template> | |
<shadowroot> | |
<div>Baaar me matey!</div> | |
</shadowroot> | |
</template> | |
<script> | |
this.addEventListener('bind', function(){ | |
// do stuff when bound | |
}); | |
</script> | |
</element> | |
/*** Method 2 ***/ | |
<template id="foo-template"> | |
<shadowroot> | |
<div>Baaar me matey!</div> | |
</shadowroot> | |
<script> | |
this.addEventListener('bind', function(){ | |
// do stuff when bound | |
}); | |
</script> | |
</template> | |
<element tagname="x-foo" template="foo-template"> | |
<style scoped> | |
/* Super slick styles for x-foo */ | |
</style> | |
</element> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment