Opened 15 years ago

Closed 15 years ago

#3040 closed defect (invalid)

dojo.connect() normalizes event names for non-DOM objects

Reported by: guest Owned by: sjmiles
Priority: high Milestone:
Component: Events Version: 0.9
Keywords: Cc:
Blocked By: Blocking:


dojo.connect() is normalizing event names for all objects, not just DOM nodes.

Connecting to normal object methods that starts with "on" will have the "on" removed in Mozilla.

For example, I have a object with method name "onrender". dojo.connect() will connect to "render" in Mozilla and "onrender" in IE.

Ideally dojo.connect() should only normalize the event name if the object is a DOM node.

Change History (3)

comment:1 Changed 15 years ago by sjmiles

It should only munge the names if it detects that 'obj' is a node, in which case it assumes you are trying to connect to a DOM event.

If you have a test case where it is doing this and 'obj' is not a node, please post the particulars.

If 'obj' is in fact a node (or node-ish) but you want to connect to a custom event (not a DOM event) pass true for the fifth parameter (dontFix) to connect.

comment:2 Changed 15 years ago by sjmiles

Owner: changed from alex to sjmiles

comment:3 Changed 15 years ago by sjmiles

Resolution: invalid
Status: newclosed

User notes that node-ish testing should be plainly documented. Also consider more accurate node testing.

Note: See TracTickets for help on using tickets.