Skip to content

Instantly share code, notes, and snippets.

Created August 6, 2013 23:02
Show Gist options
  • Save anonymous/2dcbf97ca60c7d1213e7 to your computer and use it in GitHub Desktop.
Save anonymous/2dcbf97ca60c7d1213e7 to your computer and use it in GitHub Desktop.
<!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