Bug 25258 - event handlers are undefined in v8 binding of XMLHttpRequest.
Summary: event handlers are undefined in v8 binding of XMLHttpRequest.
Status: RESOLVED DUPLICATE of bug 25257
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2009-04-16 18:12 PDT by Fumitoshi Ukai
Modified: 2014-04-24 16:45 PDT (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Fumitoshi Ukai 2009-04-16 18:12:50 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.
Comment 1 Mark Rowe (bdash) 2009-04-16 18:19:22 PDT

*** This bug has been marked as a duplicate of 25257 ***
Comment 2 Darin Adler 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.