WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
25257
event handlers are undefined in v8 binding of XMLHttpRequest.
https://bugs.webkit.org/show_bug.cgi?id=25257
Summary
event handlers are undefined in v8 binding of XMLHttpRequest.
Fumitoshi Ukai
Reported
2009-04-16 18:04:41 PDT
XMLHttpRequest of v8 doesn't have correct event handlers by default. For example, blogger.com uses the following snippet to detect whether the browser supports XMLHttpRequest. function createXmlHttp() { if (window.XMLHttpRequest) { var r = new XMLHttpRequest(); // some older version of mozilla had xmlhttprequest, but not // readystate. no reason to waste effort on them. if (r.readyState != null && typeof(r.onreadystatechange) != 'undefined') { return r; } } else { try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { // do nothing because we just fall thorough to bottom... } } return null; } With v8 binding, r.onreadystatechange is undefined, so it is considered that the browser(chromium) doesn't support XMLHttpRequest. v8 binding should return null if its event handler is not specified yet.
Attachments
use null for default event handlers in XMLHttpRequest and XMLHttpRequestUpload of v8 binding
(7.79 KB, patch)
2009-04-16 20:14 PDT
,
Fumitoshi Ukai
dglazkov
: review+
Details
Formatted Diff
Diff
use null for default event handlers in XMLHttpRequest and XMLHttpRequestUpload of v8 binding - ChangeLog entries fixed
(7.85 KB, patch)
2009-04-17 11:14 PDT
,
Fumitoshi Ukai
dglazkov
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Mark Rowe (bdash)
Comment 1
2009-04-16 18:19:22 PDT
***
Bug 25258
has been marked as a duplicate of this bug. ***
Fumitoshi Ukai
Comment 2
2009-04-16 20:14:11 PDT
Created
attachment 29570
[details]
use null for default event handlers in XMLHttpRequest and XMLHttpRequestUpload of v8 binding
Dimitri Glazkov (Google)
Comment 3
2009-04-17 10:57:48 PDT
Comment on
attachment 29570
[details]
use null for default event handlers in XMLHttpRequest and XMLHttpRequestUpload of v8 binding Great! Just two nits:
> +2009-04-16 Fumitoshi Ukai <
ukai@google.com
> > + > + Reviewed by NOBODY (OOPS!). > + > + Use null for unspecified event listener attributes of XMLHttpRequest and XMLHttpRequestUpload in v8 binding. > +
https://bugs.webkit.org/show_bug.cgi?id=25257
> + cf.
http://www.whatwg.org/specs/web-apps/current-work/#event-handler-attributes
> + An event handler attribute, unless otherwise specified, can either have the value null or be set to a Function object. > + Initially, an event handler attribute must be set to null.
Indentation is off here as well as a line break missing?
> +2009-04-16 Fumitoshi Ukai <
ukai@google.com
> > + > + Reviewed by NOBODY (OOPS!). > + > + Verify XMLHttpRequest has correct attribute value by default. > +
https://bugs.webkit.org/show_bug.cgi?id=25257
> +
Ditto.
Fumitoshi Ukai
Comment 4
2009-04-17 11:14:08 PDT
Created
attachment 29584
[details]
use null for default event handlers in XMLHttpRequest and XMLHttpRequestUpload of v8 binding - ChangeLog entries fixed Thanks for reviewing. Fixed ChangeLog entries.
Fumitoshi Ukai
Comment 5
2009-04-20 10:44:00 PDT
ping? (In reply to
comment #4
)
> Created an attachment (id=29584) [review] > use null for default event handlers in XMLHttpRequest and XMLHttpRequestUpload > of v8 binding - ChangeLog entries fixed > > Thanks for reviewing. > Fixed ChangeLog entries. >
Dimitri Glazkov (Google)
Comment 6
2009-04-24 11:33:14 PDT
Landed as
http://trac.webkit.org/changeset/42828
.
Darin Adler
Comment 7
2014-04-24 16:45:00 PDT
Moving all JavaScriptGlue bugs to JavaScriptCore. The JavaScriptGlue framework itself is long gone. And most of the more recent bugs put in this component were put there by people who thought this was for some other aspect of “JavaScript glue” and have nothing to do with the actual original reason for the existence of this component, which was an OS-X-only framework named JavaScriptGlue.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug