W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2013

Re: Promises - review of use in Network Service Discovery draft?

From: Rich Tibbett <richt@opera.com>
Date: Thu, 29 Aug 2013 19:14:36 +1000
Message-ID: <CAAsrAZAPXP-AEzVTTzQuobO+cwwN_JTmOgV=Wb1cLTh=p2hTOQ@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Frederick Hirsch <Frederick.Hirsch@nokia.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>, public-device-apis <public-device-apis@w3.org>, Marcos Caceres <marcosscaceres@gmail.com>
On Thu, Aug 29, 2013 at 4:12 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> On Wed, Jul 24, 2013 at 10:02 AM,  <Frederick.Hirsch@nokia.com> wrote:
>> <https://dvcs.w3.org/hg/dap/raw-file/tip/discovery-api/Overview.html>

>> Would members of the list that have experience with Promises please (if possible) review the Promises usage in this editors draft and let the DAP WG know of any concerns or best practices that we need to consider (or confirm that our usage looks good)?
> This is a rather late response, but the use of Promises appears fine
> at first blush.

Good. I think this answers the original request.

> Use of integer constants is bad.  Make an enum with the values
> instead, and have the error contain an attribute of that enum type.

I've gone ahead and switched error codes to error strings. This change
also means we can just return DOMError objects in this API so I also
took the opportunity to remove NavigatorNetworkServiceError from the
spec (hey, less custom interfaces!).

A spec diff is available at https://dvcs.w3.org/hg/dap/rev/5e36d90b8960

> I had a comment about not putting everything on navigator, but this
> might actually be validly connected to the navigator.

I don't have a strong opinion on this but it is (notoriously)
difficult to agree where such APIs should hang from. So we will keep
this on navigator unless a strong counter-proposal can be made.

br/ Rich

> ~TJ
Received on Thursday, 29 August 2013 09:15:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:18 UTC