W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2012

[manifest] asynchronous calls, Re: Review of Web Application Manifest Format and Management APIs

From: Marcos Caceres <w3c@marcosc.com>
Date: Fri, 25 May 2012 16:04:28 +0100
To: Anant Narayanan <anant@mozilla.com>
Cc: Marcos Caceres <marcosscaceres@gmail.com>, public-webapps@w3.org
Message-ID: <E799A0DC21DF4A61B643E997A53B7167@marcosc.com>

On Sunday, May 13, 2012 at 5:47 PM, Anant Narayanan wrote:

> > > getInstalled
> > > Retrives application records for all applications that have been installed so far. This call is available to privileged callers only.
> > 
> > 
> > 
> > What's a privileged caller? Also, if this is a getter, then it should be an attribute. Only use getXXX() for async getters.
> A privileged caller is an origin which has been authorized by the user
> to manage applications on their behalf. Privileged callers have the
> capability to enumerate all apps the user has installed, launch them,
> and uninstall them.

Ok, this was not really clear in the spec.  

> The goal is to provide a uniform interface for app dashboards across
> run-times, and to let people write their own, instead of locking
> everyone to a UA specific app management interface.
> This is an asynchronous getter:
> let op = navigator.apps.mgmt.getInstalled();
> op.onsuccess = function() { console.log(JSON.stringify(op.result)); }
> > > getSelf
> > > Retrieves the application record for the origin from which the call is made.
> > 
> > 
> > 
> > As above. This should just be an attribute called "self". Still not sure what this is though? or what it is used for?
> This is also an asynchronous call, and will be used by apps to retrieve
> their own AppObject. This is useful when an app wants to retrieve the
> receipt for their app (that was set by the app store when install() was
> called), and verify, for example, that the current user has paid for
> their app.

I'm still not sure why these are asynchronous? Is what apps are installed retrieved from a remote server or something? If you are just checking a small list of installed things on the user's device, then I don't see why you would not just have an "installed" attribute? 

myApps =  navigator.apps.installed; 

Otherwise, it seems like a lot of work just to get a list of things that are already installed on my system? 

Marcos Caceres
Received on Friday, 25 May 2012 15:07:35 UTC

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