incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Maj <...@adobe.com>
Subject Re: window.device or navigator.device or both?
Date Sat, 10 Mar 2012 20:46:36 GMT
I am fine with removing the Device API plugin being attached to navigator.
There is no mention of this in the docs anyways.

The object should still exist there so we can hang the Capture API off of
it though.

On 3/9/12 1:19 PM, "Drew Walters" <deedubbu@gmail.com> wrote:

>Prior to cordova-js the Device API was available at window.device and
>navigator.device.  The documentation seems to only mention
>window.device.  Do we need to support navigator.device or is
>window.device sufficient?
>
>Some additional background:
>
>Currently on the Android cordova-js implementation it is only
>available at window.device [1].  The BlackBerry platform file in
>cordova-js currently exposes it at both window and navigator [2].
>However, with the way that bootstrap is currently written and how
>these objects are added into the global space, there's a bit of
>clobbering going on between capture and device.  The bootstrap process
>adds capture at navigator.device.capture [3] then the BlackBerry
>platform object definition of navigator.device overrides.  This wipes
>out navigator.device.capture on OS 6 but not on OS 7.
>
>
>[1] 
>https://github.com/apache/incubator-cordova-js/blob/master/lib/platform/an
>droid.js
>[2] 
>https://github.com/apache/incubator-cordova-js/blob/master/lib/platform/bl
>ackberry.js
>[3] 
>https://github.com/apache/incubator-cordova-js/blob/master/lib/platform/co
>mmon.js


Mime
View raw message