Status: Unconfirmed
Owner: ----
Labels: Type-Bug Pri-2 OS-All Area-Misc
New issue 14875 by alexander.shipilov: null events when
Function.prototype.toString is overriden
http://code.google.com/p/chromium/issues/detail?id=14875
Chrome Version : 2.0.172.31
URLs (if applicable) :
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
Safari 4: not tested
Firefox 3.x: OK
IE 7: OK
IE 8: not tested
Next code illustrates problem:
Note: body onload handler must be defined
<html>
<head>
<script>
// Store current toString
Function.prototype.__toString = Function.prototype.toString;
// Override toString
Function.prototype.toString = function() {
// Call previous method
return this.__toString();
};
// Event handler
function documentOnClick(_event) {
alert('Event is null: ' + String(_event == null));
};
// Add listener to document's click
document.addEventListener('click', documentOnClick, false);
</script>
</head>
<body onload="void(0)"></body>
</html>
What is the expected result?
Event handler's argument is instance of MouseEvent
What happens instead?
Argument is null
Please provide any additional information below. Attach a screenshot if
possible.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---