Bug Tracker

Modify

Ticket #4792 (closed enhancement: wontfix)

Opened 4 years ago

Last modified 3 years ago

modifying the arguments for event trigger

Reported by: simon_000666 Owned by: brandon
Priority: minor Milestone: 1.4
Component: event Version: 1.3.2
Keywords: bind Cc:
Blocking: Blocked by:

Description

I think that when you call trigger, the second argument should extend the event.data object in the call rather than being the next argument so it is more consistent with the way bind works.

e.g. foo.trigger("bar", {foo: bar1}, [{foo2: bar}]);

I started a thread about it here:  http://groups.google.com/group/jquery-dev/browse_thread/thread/7a68385062295c66/aceaa52feb7cef27#aceaa52feb7cef27

Change History

comment:1 Changed 3 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to wontfix

The current design of segregating bind-time data from trigger-time data has its advantages, and extending the object would add another thing to be done at event delivery time which could impact performance.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.