Opened 15 years ago
Closed 15 years ago
#3503 closed defect (fixed)
dojo.connect does'nt propagate return from original function
Reported by: | mumme | Owned by: | sjmiles |
---|---|---|---|
Priority: | high | Milestone: | 0.9 |
Component: | Core | Version: | 0.9 |
Keywords: | connect return | Cc: | |
Blocked By: | Blocking: |
Description
Hi !
When you dojo.connect to a function that returns a value, that value well be lost.
like this:
var foo = { bar:function(){ return "bar"; } } dojo.connect(foo, 'bar', null, function(){ console.debug('foo called'); }); console.debug('foo.bar()=', foo.bar()); // prints 'foo.bar()=' not 'foo.bar()=bar'
Attaching a somewhat uggly patch with a extended test.
/ Fredrik Johansson
Attachments (1)
Change History (4)
Changed 15 years ago by
Attachment: | dojo.connect.patch added |
---|
comment:1 Changed 15 years ago by
Status: | new → assigned |
---|
comment:2 Changed 15 years ago by
comment:3 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
(In [9338]) Repair blunder in connect, now connect target should correctly return it's value. Had to effect the change in the leak-proof listener also. Refs #3503.