in a click callback, a variable "event" appears to be implicitly defined
Reported by
mpe...@raineyelectronics.com,
Mar 30 2018
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.162 Safari/537.36 Steps to reproduce the problem: 1. Click the button in the attached sample HTML file. What is the expected behavior? My understanding is the correct behavior would be that a reference error is encountered when event.preventDefault() is called because "event" is not defined. This appears to be the behavior on Mozilla. If Chrome implicitly declares a variable "event" for some reason, I'd expect it to show up in the Scope tab, probably under global. What went wrong? No error message, and also "event" does resolve when I "watch" it. Did this work before? N/A Chrome version: 65.0.3325.162 Channel: n/a OS Version: Debian Jessie Flash Version:
,
Apr 3 2018
,
Apr 3 2018
It seems Chrome v1.0 intentionally implemented it in 2008 to ease the transition of IE-specific sites that were using the non-standard window.event, see also https://developer.mozilla.org/docs/Web/API/Window/event Subsequent changes of window.event implementation: * Chrome 2: 57629f749c014e5a34d58cbd40092f43e4f62eaa mimic Safari JSC binding * Chrome 30: 653be147d71ddb42c9e2249c6f67b7181942f801 from V8WindowCustom to ExceptionState * Chrome 59: 0582ff42568b3f83c5da9e6ccf5fce1fc02e252d from V8HiddenValue to V8PrivateProperty
,
Apr 3 2018
Yes this is the definition of window.event |
|||
►
Sign in to add a comment |
|||
Comment 1 by vamshi.kommuri@chromium.org
, Apr 1 2018