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

Why EventManager contract is limited in d.ts? #317

Closed
fshchudlo opened this issue Feb 18, 2016 · 5 comments
Closed

Why EventManager contract is limited in d.ts? #317

fshchudlo opened this issue Feb 18, 2016 · 5 comments

Comments

@fshchudlo
Copy link
Contributor

It's not a bug, just question and possible enhancement.
I want to write custom attribute for elements in list. This custom attribute attaches event handlers to elements and it's reasonable to use event delegation.
Source code exploration gives me EventManager.addEventListener method. I've tried to use this method and it works correctly for both attaching and detaching handlers.
But I see that aurelia-binding.d.ts file doesn't declare this method and I don't understand why. Is it unsafe to use?

@jdanyow
Copy link
Contributor

jdanyow commented Feb 22, 2016

Good call- EventManager.addEventListener should be added to binding's public API. This method is definitely safe to use. Would you be interested in submitting a PR that adds this to the aurelia-binding.d.ts file in the src folder?

@fshchudlo
Copy link
Contributor Author

@jdanyow Did this

@jdanyow
Copy link
Contributor

jdanyow commented Feb 22, 2016

@fshchudlo much appreciated.

@EisenbergEffect CLA check

@EisenbergEffect
Copy link
Contributor

@jdanyow CLA is confirmed. Thank you @fshchudlo for joining in the fun of contributing!

@fshchudlo
Copy link
Contributor Author

@EisenbergEffect Thanks to you for great framework )

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

No branches or pull requests

3 participants