[Webkit-unassigned] [Bug 25257] New: event handlers are undefined in v8 binding of XMLHttpRequest.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 16 18:04:42 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=25257

           Summary: event handlers are undefined in v8 binding of
                    XMLHttpRequest.
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: JavaScriptGlue
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: ukai at google.com


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.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list