Skip to content

Instantly share code, notes, and snippets.

@trey
Last active August 10, 2016 11:02
Show Gist options
  • Save trey/3329188a77a6d628c28a to your computer and use it in GitHub Desktop.
Save trey/3329188a77a6d628c28a to your computer and use it in GitHub Desktop.
Setting a Click Event on a Polymer Element.

Setting a Click Event on a Polymer Element.

Polymer({
    is: 'your-element',

    listeners: {
        'click': '_handleClick'
    },

    _handleClick: function() {
        console.log('You clicked me.');
    },

    // ...
});
@nawrasbaghdadi
Copy link

what if the click event is fired from a child element inside a polymer element how to handle the click event ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment