W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2013

Re: window.event and Event.srcElement

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 25 Mar 2013 22:17:40 -0400
Message-ID: <51510544.3010506@mit.edu>
To: David Bruant <bruant.d@gmail.com>
CC: public-webapps@w3.org
On 3/25/13 4:36 PM, David Bruant wrote:
>> We could complicate the scoping setup for event handlers even more, of
>> course.  Would any UAs actually be willing to implement that (given
>> that e.g. Chrome doesn't even implement the current, simpler, scoping
>> setup sanely)?
> Any info on why they don't implement the spec scoping rules?

Because it happened to be easy in their implementation to do something 
with with() instead, last I checked.

On the other hand, I just double-checked the bug report and they claim 
to have fixed it (see 
http://code.google.com/p/chromium/issues/detail?id=80911 and I wish I'd 
get mail to some sane mail address from that bug reporting system).  So 
maybe they'd be willing to do something more complicated....

> Is it going to be a case of de-facto standard too?

I doubt it.

> Only an insane option. Sharing as food for thoughts:
> when about to call a function from an eval'ed on* attribute string,
> change the function's [[Scope]] to contain an extra scope with an
> "event" variable. Restore the [[Scope]] to its original value when the
> frame is dropped.

I think that qualifies as insane, yes.  ;)

Received on Tuesday, 26 March 2013 02:18:09 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:59 UTC