----- Original Message ----- From: "Jonas Sicking" <jo...@sicking.cc> To: "Adam Barth" <w...@adambarth.com> Cc: "David Dahl" <dd...@mozilla.com>, public-webapps@w3.org Sent: Friday, June 3, 2011 12:31:48 AM Subject: Re: Request for feedback: DOMCrypt API proposal
> I agree that keychains and the like seems like a can of worms. However something that we'll eventually will need in some form. > I suggest that we punt on this feature for now and leave it for version 2. It can always be kept in the prototype using a 'moz' prefix. Ok, consider it done. > I absolutely agree that this needs to live on the 'crypto' property. Introducing new properties on the window object always carries big risks since it shares namespace with global variables. Hence introducing a new property can break pages that have no intention of using the property. This can be mitigated by making the property replaceable, but that only fixes half the problem so isn't really a solution. I did not think about that. Great insight. > In this case we have the extremely rare luxury of having a property already existing which not lives where we want it to live (the window object), but also has a pretty good name. So the final implementation should definitely hang the new API off of this property. For prototyping purposes, it's easy to just call the property 'mozCrypto'. That'll let you use the same APIs that you already are to hook it up. Ok, I will do that. Thanks, David