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

Add target to events #27

Open
flexyford opened this issue Jun 2, 2016 · 4 comments
Open

Add target to events #27

flexyford opened this issue Jun 2, 2016 · 4 comments

Comments

@flexyford
Copy link
Contributor

flexyford commented Jun 2, 2016

It would help me to enableEvents on something other than window.

It would be nice to have the following API:

this.get('userActivity').enableEvent(eventName, target, element);

Such that I can do something like this

this.get('userActivity').enableEvent('mouseout', this, '.some-component');

Otherwise, the mouseout event is going to fire on all of windows children, which is every element in the DOM.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@elwayman02
Copy link
Owner

This seems like a pretty sane suggestion! I already did something like this for scroll events, we can probably build a similar system + component mixins for this!

@flexyford
Copy link
Contributor Author

Are you referring to the subscribe function?

@elwayman02
Copy link
Owner

elwayman02 commented Jun 2, 2016

Yea, basically we would need to maintain a separate list of elements to watch for each event type, though since there are multiple events we may not implement a subscribe method the same way the scroll service is done. I'd have to think through the architecture a little bit more to figure out what kind of DSL makes sense here.

@elwayman02
Copy link
Owner

@flexyford I haven't forgotten about this, but I'm going to be on vacation for a few weeks so it may be a while until this issue gets addressed. If you want to take a stab at implementing it, feel free; otherwise I just wanted to give you an update so you know I'm still thinking about it! :)

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

No branches or pull requests

2 participants