[Bug 198595] event.target, event.currentTarget and the this object are not set consistently in onload handlers of XMLHttpRequest and XMLDocument (fwd)

Please consider this when writing the ECMAScript binding for DOM3 Events.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

---------- Forwarded message ----------
Subject: [Bug 198595] event.target,
    event.currentTarget and the this object are not set consistently in onload
    handlers of XMLHttpRequest and XMLDocument
From: bugzilla-daemon@mozilla.org
To: ian@hixie.ch
Date: Fri, 10 Mar 2006 12:24:56 -0800

Do not reply to this email.  You can add comments to this bug at
https://bugzilla.mozilla.org/show_bug.cgi?id=198595





------- Comment #13 from bzbarsky@mit.edu  2006-03-10 12:24 PST -------
> What does DOM Events say EventListeners should have their "this" bound to?

Undefined in the spec.  All the bindings say is:

  Object EventListener
    This is an ECMAScript function reference. This method has no return value.
    The parameter is a Event object.

I guess for addEventListener and so forth we do rebind |this|, so we should do
the same for XMLHttpRequest.

Alex, please read
http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/ecma-script-binding.html
carefully.



-- 
Configure bugmail: https://bugzilla.mozilla.org/userprefs.cgi?tab=email

Received on Friday, 10 March 2006 20:35:44 UTC