Handle some edge cases with binding events to the window object (which is also a plain object - causing some confusion). Fixes #7143.

This commit is contained in:
John Resig 2010-10-11 18:20:57 -04:00
parent c00a6ff1f1
commit 1df5084c97
2 changed files with 7 additions and 3 deletions

View file

@ -1830,11 +1830,15 @@ test("Non DOM element events", function() {
});
test("window resize", function() {
expect(1);
expect(2);
jQuery(window).unbind();
jQuery(window).bind("resize", function(){
ok( true, "Resize event fired." );
}).resize().unbind("resize");
ok( !jQuery(window).data("events"), "Make sure all the events are gone." );
});
/*