Modify ↓
Ticket #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: | ||
| 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
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.
