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

Event triggering #3

Closed
wants to merge 2 commits into from
Closed

Event triggering #3

wants to merge 2 commits into from

Conversation

zenlor
Copy link

@zenlor zenlor commented Dec 14, 2012

I added a small function to the lib, I tested it in firefox and chrome, It may work in ie8 and lower. Pushed this only because it seems fitting to the library intent.

@rauchg
Copy link
Member

rauchg commented Dec 14, 2012

+1 on adding it, -1 on implementation. The argument list is really confusing. I would probably go with an options object.

event.trigger(el, 'click', { bubble: false });

@zenlor
Copy link
Author

zenlor commented Dec 14, 2012

indeed I slapped the options in the function arguments without even thinking about it's complexity. I'll split them up

@zenlor
Copy link
Author

zenlor commented Dec 14, 2012

just a note, if you don't like three local variables it can be written in a more compact way

@tj
Copy link
Member

tj commented Dec 14, 2012

I know createEvent takes a lottttt more args than that, something ridiculous like 12, however I think there's already a component for creating events

@tj
Copy link
Member

tj commented Dec 14, 2012

@zenlor
Copy link
Author

zenlor commented Dec 14, 2012

oh that's more complete for sure, I was using the function to simply trigger a 'click' event on a 'input[type="file"]'

@tj
Copy link
Member

tj commented Dec 14, 2012

I'll close for now, this one could possibly be renamed to something a little less ambiguous if it's just going to be the simple event binding

@tj tj closed this Dec 14, 2012
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

Successfully merging this pull request may close these issues.

None yet

3 participants