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

Consider allowing wildcards in event names #4

Open
ryanguill opened this issue Sep 24, 2014 · 2 comments
Open

Consider allowing wildcards in event names #4

ryanguill opened this issue Sep 24, 2014 · 2 comments

Comments

@ryanguill
Copy link
Owner

This would allow you to listen on a.* which would fire on a.b or a.c.

  • matches zero or one word separated by periods, # matches one zero or more words.

addEventListener("#", listener) would listen on all events.

Need to consider if this means we need to pass event name into the listener by default...

@ryanguill ryanguill self-assigned this Sep 24, 2014
@ryanguill
Copy link
Owner Author

I have started passing the event name into the listener by default as __eventName.

Another route we can go with this is to allow full regex on listeners. It would probably be easier to implement, but much more complicated to use - not sure if the majority of use cases need that much flexibility.

@ryanguill
Copy link
Owner Author

I am deferring this indefinitely until a need arises. If you have a use case for this functionality get in touch.

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

1 participant