Use a key name less likely to result in collisions for events on plain JS objects. Fixes bug #7150.

This commit is contained in:
Colin Snover 2010-10-11 23:35:18 -05:00
parent 6245ecb2b9
commit ff6ceadbfd
2 changed files with 12 additions and 8 deletions

View file

@ -457,7 +457,7 @@ test("bind()/trigger()/unbind() on plain object", function() {
ok( true, "Custom event run." );
});
var events = jQuery(obj).data("events");
var events = jQuery(obj).data("__events__");
ok( events, "Object has events bound." );
equals( typeof events, "function", "'events' expando is a function on plain objects." );
equals( obj.test, undefined, "Make sure that test event is not on the plain object." );