New issue
Advanced search Search tips

Issue 827534 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Apr 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

in a click callback, a variable "event" appears to be implicitly defined

Reported by mpe...@raineyelectronics.com, Mar 30 2018

Issue description

UserAgent: 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:
 
event_not_defined.html
319 bytes View Download
Labels: Needs-Triage-M65

Comment 2 by junov@chromium.org, Apr 3 2018

Components: -Blink Blink>Input

Comment 3 by woxxom@gmail.com, 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
Status: WontFix (was: Unconfirmed)
Yes this is the definition of window.event

Sign in to add a comment