Skip to main content

Bug Tracker

Side navigation

#10747 closed bug (duplicate)

Opened November 10, 2011 10:28AM UTC

Closed November 10, 2011 03:40PM UTC

Last modified November 10, 2011 03:40PM UTC

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.

Attachments (0)
Change History (2)

Changed November 10, 2011 03:40PM UTC by rwaldron comment:1

resolution: → duplicate
status: newclosed

Changed November 10, 2011 03:40PM UTC by rwaldron comment:2

Duplicate of #7930.