incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Drew Walters <>
Subject window.device or navigator.device or both?
Date Fri, 09 Mar 2012 21:19:39 GMT
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