]> source.dussan.org Git - jquery.git/commitdiff
We no longer support globally-triggered events on plain objects. This is a trade...
authorjeresig <jeresig@gmail.com>
Tue, 2 Mar 2010 15:51:31 +0000 (10:51 -0500)
committerjeresig <jeresig@gmail.com>
Tue, 2 Mar 2010 15:51:31 +0000 (10:51 -0500)
test/unit/event.js

index a9c88153f629ab849a1345d8be38af2fdeff86a6..b224070e3af10abeb9f64fd9a0af4f70bfcf0361 100644 (file)
@@ -1715,24 +1715,15 @@ test("delegate with submit", function() {
 });
 
 test("Non DOM element events", function() {
-       expect(3);
-
-       jQuery({})
-               .bind('nonelementglobal', function(e) {
-                       ok( true, "Global event on non-DOM annonymos object triggered" );
-               });
+       expect(1);
 
        var o = {};
 
-       jQuery(o)
-               .bind('nonelementobj', function(e) {
-                       ok( true, "Event on non-DOM object triggered" );
-               }).bind('nonelementglobal', function() {
-                       ok( true, "Global event on non-DOM object triggered" );
-               });
+       jQuery(o).bind('nonelementobj', function(e) {
+               ok( true, "Event on non-DOM object triggered" );
+       });
 
        jQuery(o).trigger('nonelementobj');
-       jQuery.event.trigger('nonelementglobal');
 });
 
 /*