[Sugar-devel] Using Sugarizer as development environment for Sugar Web Activities

Daniel Narvaez dwnarvaez at gmail.com
Sat Feb 15 17:39:32 EST 2014

On 15 February 2014 23:22, Daniel Narvaez <dwnarvaez at gmail.com> wrote:

> We have env.isStandalone() to distinguish between running inside an
> activity and in a plain web browser. But I suppose we will need a way to
> distinguish between a plain web browser and Sugarizer. We could just use a
> well known localstorage key... If it exists it's Sugarizer, otherwise plain
> web browser. And maybe change isStandalone to getMode (activity, browser,
> sugarizer) or something. The naming is not really well thought but I hope
> it gives the idea.

The whole environment thing is really messy at the moment and this is going
to make it worst. Though I think it's more important to avoid forking too
much then to find a clean way to do it right now.

The only aspect I'm worried about is if we can always provide a sync
implementation of isStandalone/getMode()... changing from sync to async
later would be messy. Though a sync implementation is possible in all the
cases I can think about and it should simplify things a lot compared to
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20140215/4e6d926f/attachment.html>

More information about the Sugar-devel mailing list