On Fri, Aug 24, 2012 at 7:51 PM, Seth Ladd <
seth...@google.com> wrote:
> Sounds like a job for JS interop (which I believe is the way to get at
> browser APIs that we don't ship an equivalent Dart API) In the meantime,
> while JS interop is coming online, can you use postMessage to do this?
postMessage is indeed how we are doing it, was just unsure if
something fancier had come along
>
> Also, is there an argument for putting this into Dart's navigator object?
navigator.standalone is iOS specific however when developing mobile
web apps you in general have to style WebView apps differently than
browser based apps (same goes for Android). As the browser app will
have stuff you need to remove (like a topbar) in order to make it
behave like an actual app. WebView (PhoneGap) based apps does not have
this problem. So one could argue that there is some sort of general
concept here that might warent inclusion in Dart.
>
>
> On Fri, Aug 24, 2012 at 1:29 PM, Lars Tackmann <
la...@randompage.org> wrote:
>>
>> When making mobile sites with JS I usually use navigator.standalone to do
>> feature detection on iOS devices, i.e.
>>
>> if(window.navigator.standalone == null) {
>> print("not running in iOS browser");
>> } else if (window.navigator.standalone == false) {
>> print("using mobile safari");
>> } else {
>> print("running standalone app on iOS");
>> }
>>
>> what's the Dart way of performing this type of feature detection ?
>>
>>
>> --
>> Lars Tackmann
>>
>> --
>> Consider asking HOWTO questions at Stack Overflow:
>>
http://stackoverflow.com/tags/dart
>>
>>
>
>
> --
> Consider asking HOWTO questions at Stack Overflow:
>
http://stackoverflow.com/tags/dart
>
>
--
Yours sincerely
Lars Tackmann