We no longer support globally-triggered events on plain objects. This is a trade-off to having good garbage collection on the objects.
This commit is contained in:
parent
86ace44fbb
commit
5c111a028a
|
@ -1715,24 +1715,15 @@ test("delegate with submit", function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
test("Non DOM element events", function() {
|
test("Non DOM element events", function() {
|
||||||
expect(3);
|
expect(1);
|
||||||
|
|
||||||
jQuery({})
|
|
||||||
.bind('nonelementglobal', function(e) {
|
|
||||||
ok( true, "Global event on non-DOM annonymos object triggered" );
|
|
||||||
});
|
|
||||||
|
|
||||||
var o = {};
|
var o = {};
|
||||||
|
|
||||||
jQuery(o)
|
jQuery(o).bind('nonelementobj', function(e) {
|
||||||
.bind('nonelementobj', function(e) {
|
|
||||||
ok( true, "Event on non-DOM object triggered" );
|
ok( true, "Event on non-DOM object triggered" );
|
||||||
}).bind('nonelementglobal', function() {
|
|
||||||
ok( true, "Global event on non-DOM object triggered" );
|
|
||||||
});
|
});
|
||||||
|
|
||||||
jQuery(o).trigger('nonelementobj');
|
jQuery(o).trigger('nonelementobj');
|
||||||
jQuery.event.trigger('nonelementglobal');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue