Issue metadata
Sign in to add a comment
|
window.even is available in any DOM event handler although is not defined
Reported by
zayan...@gmail.com,
Mar 21 2017
|
||||||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36
Steps to reproduce the problem:
1. Any function that handle DOM events, example:
document.body.onclick=function(e) { console.log(event); }
2. click event is triggered
3. the console log a MouseEvent Object
What is the expected behavior?
Should give an error
(Uncaught ReferenceError: event is not defined)
What went wrong?
This proprietary is non-standard, and Chrome supports it because of compatibility to old IE, but at least the developer should be warn of this non-standard usage, or given an error to be more compliant with standards.
Did this work before? N/A
Chrome version: 57.0.2987.98 Channel: stable
OS Version: 10.0
Flash Version:
Developers could use the proprietary without intention to use it, example using 'e' in the function declaration but 'event' inside the function, example:
document.body.onclick=function(e) { console.log(event); }
,
Mar 21 2017
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by dtapu...@chromium.org
, Mar 21 2017Components: -Blink Blink>Bindings