#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 11 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
comment:2 Changed 11 years ago by
Note: See
TracTickets for help on using
tickets.
Duplicate of #7930.