Re: The Device API

Hi Dion,

On Dec 2, 2009, at 21:21 , Dion Almaer wrote:
> navigator has the legacy / "no more globals" appeal, but in todays world feels very very wrong.
> 
> We are a web platform now, not a navigator ;)

We know. When we first discussed this, many expressed dislike at hooking into navigator. But not polluting the global namespace really is the safer and cleaner option for APIs that will run in browsers.

That being said, all may not be lost for those who aren't navigators ;-) We're trying to make everyone happy here, or failing that at least accepting of the outcome with no more grumpiness that beer couldn't fix.

Anything that implements the Device API gets to have all the DAP APIs exposed, and if you're confident that you can safely pollute the global namespace (as PhoneGap is, and I'd expect webOS too) nothing prevents you from adding window.device, or webOS.device in that context. In order for libraries written for the web at large to work you'd probably still want to expose the same as navigator.device, but you wouldn't have to push that forward.

I've been wondering if Widgets should expose widget.device. It's not functionally useful, but it does make people somewhat happier.

--
Robin Berjon
  robineko — hired gun, higher standards
  http://robineko.com/

Received on Thursday, 3 December 2009 10:09:52 UTC