Bug Tracker

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#10747 closed bug (duplicate)

Triggering event on object causes object method call

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

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 (2)

comment:1 Changed 6 years ago by Rick Waldron

Resolution: duplicate
Status: newclosed

comment:2 Changed 6 years ago by Rick Waldron

Duplicate of #7930.

Note: See TracTickets for help on using tickets.