On Mon, Jul 9, 2012 at 4:11 PM, Anant Narayanan <[email protected]> wrote:
> Thanks for the detailed description, Jonas! +1 for supporting packaged apps.
>
>
> On 07/09/2012 10:04 AM, Jonas Sicking wrote:
>>
>> To make things more similar to how web pages normally work, we could allow
>> pages from app://developer.com/ to make network requests to
>> http://developer.com. I.e. the app would be allowed to open XMLHttpRequest
>> connections to http://developer.com/ <http://developer.com/.>myapi.cgi
>> without
>>
>> requesting any special privileges. Likewise <img>s and <video>s loaded
>> from
>> http://developer.com would not be considered cross-origin for example for
>> the purposes of tainting when drawn into a <canvas>. This way most of the
>> code which would work for a website would work in a packaged app, except
>> that the packaged app would have to ensure to use absolute URLs when
>> wanting to connect to the website.
>
>
> Does this require all packaged apps to also have a "home" domain? One of the
> benefits of the packaged approach is that many kinds of developers will no
> longer have to worry about hosting web content at all, they can simply
> uploads zip files generated on their machine to various app stores.
>
> I think it's fine to stipulate that all apps require a home domain for v1,
> if it's not in scope for B2G, but we may want to consider supporting
> domain-less apps at some point in the future.

I see no reason to require apps to have a home domain. Simply saying
that there is no "home domain" which the app would have the ability to
access without CORS should be easy. The only complicated part that I
can think of is which URLs the app would use for its internal
resources. One possibility would be to use a UUID like
app://<uuid>/startpage.html

I can't give any promises regarding what we'll have time to implement
in the first version, but on the surface it doesn't look too hard.

/ Jonas
_______________________________________________
dev-webapps mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-webapps

Reply via email to