incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Drew Walters <>
Subject Re: window.device or navigator.device or both?
Date Fri, 16 Mar 2012 19:10:12 GMT
With the merge code I added I was able to add back in support for
device at both window.device and navigator.device.  Since that was the
historical behavior I have left it in.

On Sat, Mar 10, 2012 at 2:46 PM, Filip Maj <> wrote:
> 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" <> 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.

View raw message