Skip to content

Document the behavior for camelCased plugins/events in the widget factory #182

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

Closed
FagnerMartinsBrack opened this issue Oct 25, 2013 · 5 comments

Comments

@FagnerMartinsBrack
Copy link

http://jsfiddle.net/UmacR/

It wasn't clear the behavior of camel cased events according to the jquery ui widget API documentation.
Of course it would be pretty crazy if jquery UI did not handled in some way (greatPluginexecuteEvent), but the current behavior to lowercase everything is not mentioned in the docs and is not as intuitive as you think it is.
To avoid looking into source I had to create a JSFiddle to check the behavior.

This is an information so simple that could be presented like:

Events

...For most widgets, when the events are triggered, the names are prefixed with the widget name and all converted to lowercase...

or something like that.

The given example in the page do not imply the current behavior, since both sides are built using a single word

@FagnerMartinsBrack
Copy link
Author

By the way I assume this is supported and not just some implementation detail, looking for confirmation though.

@tjvantoll
Copy link
Member

Yeah this is intentionally done and seems like a good idea to document.

@jzaefferer
Copy link
Member

@tjvantoll could you work on documenting this?

@tjvantoll
Copy link
Member

@FagnerMartinsBrack Does this work?

@FagnerMartinsBrack
Copy link
Author

Yes, I suppose a simple mention of the intent will do the trick.

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

Successfully merging a pull request may close this issue.

3 participants