If I extend the Object prototype and try to use some functions of jQuery 2.0.3 I get errors...
Object.prototype.GetHashCode = function() { return 1; };
$(document).on("click", "div", function() { });
If I do this and then click any div I get an error
Uncaught TypeError: Object function () { return 1; } has no method 'exec'
Why does it happen? Is there a workaround or a way to fix this bug in jQuery?
for inproperty enumerations with extending theObject.prototype. It is not a bug in jQuery. Is there a workaround? - see the linked duplicate$('div').click(function() { console.log('div clicked'); });for inloop is used in the code when a delegated event is triggered, but not for a directly attached handler.