W3C home > Mailing lists > Public > public-websignage@w3.org > October 2016

Re: Unofficial API draft "Device Information API"

From: Sangwhan Moon <sangwhan@iki.fi>
Date: Wed, 19 Oct 2016 10:50:55 +0900
Cc: public-websignage@w3.org
Message-Id: <77292F58-6B46-419E-80B0-1DE0FD4D9224@iki.fi>
To: Futomi Hatano <futomi.hatano@newphoria.co.jp>




Sangwhan Moon
> On 19 Oct 2016, at 3:20 AM, Futomi Hatano <futomi.hatano@newphoria.co.jp> wrote:
> 
> Hi all,
> 
> At the Group meeting at TPAC 2016, we listed APIs
> which will be disicussed in the incoming WG.
> https://www.w3.org/community/websignage/wiki/Group_meeting_at_TPAC_2016#APIs
> 
> Though the WG has not been chartered yet, I tried to
> create an API draft "Device Information API".
> You can see the draft on my personal github account.
> http://rawgit.com/futomi/W3C_Web-based_Signage_BG/master/device_infomation_api.html
> 
> I know that the "Device Information API" is not decided to
> be included in the scope of the WG.
> I just hope this draft makes our discussion active.
> 

Just as a curious question, why Promises? Most of that information is static, so everything is already known at the time of creation and returning said DeviceInfo object should be instant, if not in constant (and very short) time.

The only case where the promise makes sense is if the context has navigated away from the initial URL (if I understood the design correctly) but if it's a synchronous API, this would be a security violation so throwing would be perfectly appropriate. (Additionally, this simplifies the implementation for implementors who will be implementing this with say, addJavascriptInterface())

(I'm a non-member, so take my input as a simple comment)
Received on Wednesday, 19 October 2016 01:51:22 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:23:30 UTC