Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need Polymer.Base.unlisten to remove the event listener #1639

Closed
frankiefu opened this issue May 28, 2015 · 1 comment
Closed

Need Polymer.Base.unlisten to remove the event listener #1639

frankiefu opened this issue May 28, 2015 · 1 comment
Assignees
Labels

Comments

@frankiefu
Copy link
Member

Currently we have Polymer.Base.listen to add an event listener e.g. tap. But we also need Polymer.Base.unlisten to remove the event listener.

@frankiefu
Copy link
Member Author

This is needed for cases like in iron-selector which wants to default activateEvent to tap (https://github.com/PolymerElements/iron-selector/blob/master/iron-selectable.html#L64). But user of iron-selector may choose to have activateEvent set to something else like down, up or ''. We need a way to remove the default tap event.

@kevinpschaaf kevinpschaaf added the p2 label Jun 3, 2015
dfreedm added a commit that referenced this issue Jun 4, 2015
Keep generated event handlers, attach with WeakMap to host element
Add tests for events

Fixes #1639
dfreedm added a commit that referenced this issue Jun 8, 2015
Keep generated event handlers, attach with WeakMap to host element
Add tests for events

Support multi-dispatch unlisten (must give event name and handler function
name).

Fixes #1639
adalinesimonian added a commit to adalinesimonian/iron-selector that referenced this issue Jun 12, 2015
Polymer/polymer#1740 adds `unlisten` functionality, thus fixing blocking issue Polymer/polymer#1639. Now `iron-selector` can properly remove the event listener for the old activate event when it is changed instead of being forced to ignore unwanted calls handler calls.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants