jQuery: The Write Less, Do More JavaScript Library

Ticket #1417 (closed bug: fixed)

Opened 1 year ago

Last modified 1 year ago

event.trigger() doesn't return the handle() results

Reported by: john Assigned to: john
Type: bug Priority: major
Milestone: 1.2 Component: event
Version: 1.1.4 Keywords:
Cc: Needs: Review

Description

Returning the results of all method calls, as an array, would probably be ideal.

This will require modification of both .trigger() and .handle().

Attachments

Change History

Changed 1 year ago by john

  • status changed from new to closed
  • version changed from 1.1.3 to 1.1.4
  • resolution set to fixed
  • milestone changed from 1.1.4 to 1.2

It's now possible to call jQuery's internal trigger and get back the final result, for example:

        $("#test").bind("click",function(e){
                return "FOO";
        });
        console.log( jQuery.event.trigger( "click", null, $("#test")[0] ) );

Results in: "FOO" being sent to the console.

Fixed in SVN rev [2950].

Changed 1 year ago by john

Fixed in SVN rev [3008] (for the $().trigger() method).

Note: See TracTickets for help on using tickets.