W3C home > Mailing lists > Public > public-device-apis@w3.org > December 2009

Re: The Device API

From: Robin Berjon <robin@robineko.com>
Date: Thu, 3 Dec 2009 11:09:16 +0100
Cc: Brian LeRoux <brian@westcoastlogic.com>, public-device-apis@w3.org
Message-Id: <57478276-12DC-4FFC-8917-018C9427854E@robineko.com>
To: Dion Almaer <dion@almaer.com>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:14:02 GMT