On Wed, 03 Feb 2010 18:55:32 +0100, Olli Pettay <olli.pet...@helsinki.fi>
wrote:
some random comments about
http://dev.w3.org/2006/webapi/WebNotifications/publish/
(I didn't know that the draft existed until the link was mentioned
in an email to @whatwg mailing list :/ )
Some other thoughts on this API:
* It would be nice if we could avoid the exception somehow. Maybe just
have an error callback?
* I'm not a big fan of introducing two new ways to load resources as
proposed in this API. We are not doing that elsewhere either (consider
e.g. drawImage()). Passing a Document and HTMLImageElement (potentially
HTMLCanvasElement and HTMLVideoElement too I suppose) would make more
sense. This does create some additional burden on the developer but it
does keep security-sensitive operations more limited and also gives the
ability for greater control and information. (E.g. with XMLHttpRequest you
get to know how fast the resource is being fetched, etc.) Libraries could
provide the higher-level API.
* If we keep checkPermission() it should not be a method. But I'm not sure
it is needed if there is an error callback.
--
Anne van Kesteren
http://annevankesteren.nl/