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 <[email protected]> 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" <[email protected]> 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 >
