ui parameter in events/callbacks

50 views
Skip to first unread message

Scott González

unread,
Apr 30, 2008, 2:51:44 PM4/30/08
to jQuery UI Development
Ticket #2545

There needs to be some consistency in the ui parameter for events/
callbacks in all plugins. Please post your opinions about what data
should be available in all plugins and how the data should be exposed
(what property names should be used, etc.). Also, if you have any
idea for a pattern for deciding how to expose other useful
information, please post those ideas (i.e., the sortable helper and
the dragged element in a drop should probably be treated in a similar
manner).

This really should be addressed before the 1.5 RC1 release this
weekend. Let's post ideas here and I'll link to this discussion from
the ticket.

Paul Bakaus

unread,
Apr 30, 2008, 2:56:16 PM4/30/08
to jquery...@googlegroups.com
Hey Scott,

good thread. Here's my list, these should definitely included if applicable:

- ui.element => points to 'this", the source element
- ui.options

other than that, Richard proposed to exclude instance from the list, which makes sense, because it's to dangerous. So definitely not include ui.instance.
--
--
Paul Bakaus
Frontend Architect
--
http://paulbakaus.com

Richard D. Worth

unread,
Apr 30, 2008, 2:58:45 PM4/30/08
to jquery...@googlegroups.com
Yes, ui.instance is a HUGE api hole. That should be removed.

I think all dom elements should be DOM Elements, not jQuery objects, for consistency.

Is ui.element needed? 'this' is always the source element.

- Richard

Paul Bakaus

unread,
Apr 30, 2008, 3:03:41 PM4/30/08
to jquery...@googlegroups.com
true, it's not really needed (ui.element). However, both changes can be only made if we have sophisticated test set up - this is VERY tricky to track - you need to check all plugins if they still work correct.

Richard D. Worth

unread,
Apr 30, 2008, 3:08:55 PM4/30/08
to jquery...@googlegroups.com
Yes, this is planned for testing. It it tricky. And vital.

- Richard
Reply all
Reply to author
Forward
0 new messages