W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2013

[Bug 21635] New: "resolve" in Future example should probably be "resolver"

From: <bugzilla@jessica.w3.org>
Date: Tue, 09 Apr 2013 09:15:30 +0000
To: www-dom@w3.org
Message-ID: <bug-21635-4009@http.www.w3.org/Bugs/Public/>

            Bug ID: 21635
           Summary: "resolve" in Future example should probably be
    Classification: Unclassified
           Product: WebAppsWG
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DOM
          Assignee: annevk@annevk.nl
          Reporter: harald@alvestrand.no
        QA Contact: public-webapps-bugzilla@w3.org
                CC: mike@w3.org, www-dom@w3.org

>From the example:

    xhr.onload = function() {
      resolve.reject(new DOMError("JSONError"))
    xhr.onloadend = function() { resolver.reject(new DOMError("NetworkError"))

If "resolve" in line 4 is "resolver", I think I understand this.

BTW: The idiom of "reject does nothing if resolver.resolve succeeded" wasn't
obvious to me until the third reading; it might be reader-friendly to add a
comment about this.

You are receiving this mail because:
You are on the CC list for the bug.
Received on Tuesday, 9 April 2013 09:15:32 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:37:02 UTC