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:


Hi !

When you dojo.connect to a function that returns a value, that value well be lost.

like this:

   var foo = {
         return "bar";

  dojo.connect(foo, 'bar', null, function(){
    console.debug('foo called');

  console.debug('',; // prints '' not ''

Attaching a somewhat uggly patch with a extended test.

/ Fredrik Johansson

Attachments (1)

dojo.connect.patch (1.5 KB) - added by mumme 15 years ago.

Download all attachments as: .zip

Change History (4)

Changed 15 years ago by mumme

Attachment: dojo.connect.patch added

comment:1 Changed 15 years ago by sjmiles

Status: newassigned

comment:2 Changed 15 years ago by sjmiles

(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.

comment:3 Changed 15 years ago by sjmiles

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.