<div dir="ltr">On 15 February 2014 23:22, Daniel Narvaez <span dir="ltr"><<a href="mailto:dwnarvaez@gmail.com" target="_blank">dwnarvaez@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><div>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.<br>
</div>
</div></div></div>
</blockquote></div><br></div><div class="gmail_extra">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.<br>
<br>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 async.<br>
</div></div>