Bug Tracker

Modify

Ticket #10747 (closed bug: duplicate)

Opened 19 months ago

Last modified 19 months ago

Triggering event on object causes object method call

Reported by: zeljko Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7
Keywords: Cc:
Blocking: Blocked by:

Description

For example if we have custom object:

var obj =
{
  init: function() {}
};

and we trigger custom event on that object:

$(obj).trigger('init');

object's "init" function gets called automatically.

Test fiddle:  http://jsfiddle.net/pSAzu/

In this test example we get stack overflow exception which is very hard to spot. Because of that I think that no object method should be called automatically when triggering event.

Change History

comment:1 Changed 19 months ago by rwaldron

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

comment:2 Changed 19 months ago by rwaldron

Duplicate of #7930.

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.