-
-
Save anonymous/2dcbf97ca60c7d1213e7 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
<!doctype html> | |
<html> | |
<head> | |
<script src="../polymer/polymer.js"></script> | |
</head> | |
<body> | |
<polymer-element name="x-foo" on-click="clickHandler2"> | |
<template> | |
<div on-click="clickHandler"> | |
<content></content> | |
</div> | |
<div on-click="clickHandler"> | |
<content select="div"></content> | |
</div> | |
</template> | |
<script> | |
Polymer('x-foo', { | |
clickHandler: function(e) { | |
console.log('click', e.target); | |
}, | |
clickHandler2: function(e) { | |
console.log('click2', e.target); | |
} | |
}); | |
</script> | |
</polymer-element> | |
<x-foo> | |
hi | |
<div>I'm a div!</div> | |
</x-foo> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment