[Bug 25457] New: Adding "AutocompleteError" to error names table

https://www.w3.org/Bugs/Public/show_bug.cgi?id=25457

            Bug ID: 25457
           Summary: Adding "AutocompleteError" to error names table
           Product: WebAppsWG
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DOM
          Assignee: annevk@annevk.nl
          Reporter: dbeam@chromium.org
        QA Contact: public-webapps-bugzilla@w3.org
                CC: mike@w3.org, www-dom@w3.org

Hi,

I'm implementing requestAutocomplete()[1] in Blink/Chrome.  I'd like to make
requestAutocomplete() return a Promise[2].

The W3C TAG's guide to promises[3] recommends that promises be rejected with a
DOMException, but not all of requestAutocomplete()'s failure methods map
cleanly to the existing error names[4].  Adding new names for these specific
failure categories doesn't seem useful to the platform.  Additionally, many
potential failure causes may have the same reason property[5] ("disabled" =>
SecurityError, WrongDocumentError?, InvalidAccessError?)** and the terminology
differs slightly ("cancel" => AbortError).

Because this would be confusing to web authors, I'd like to add a new name of
"AutocompleteError" with a code of 0 (and if a message is required: "An attempt
to autocomplete a form failed." or something along these lines).

I'm posting all of this to the whatwg@ thread[2] after filing this bug.

Thanks!

--
Dan Beam
dbeam@chromium.org

[1]
http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#dom-form-requestautocomplete
[2] http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2014-April/254142.html
[3] https://github.com/w3ctag/promises-guide#rejection-reasons-should-be-errors
[4] http://w3c.github.io/dom/#error-names-0
[5]
http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#autocompleteerrorevent

** best guesses at existing DOMException names, though they're not great
equivalents

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Friday, 25 April 2014 04:02:35 UTC