W3C home > Mailing lists > Public > public-webcrypto@w3.org > July 2014

Re: Spec for CryptoKey.algorithm and CryptoKey.usages doesn't really make sense

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 14 Jul 2014 21:30:27 -0400
Message-ID: <53C48433.500@mit.edu>
To: Ryan Sleevi <sleevi@google.com>
CC: "public-webcrypto@w3.org" <public-webcrypto@w3.org>, Domenic Denicola <domenic@domenicdenicola.com>
On 7/14/14, 7:11 PM, Ryan Sleevi wrote:
> So we're on the same page, I'm imagining that it would (effectively) be
> something like http://heycam.github.io/webidl/#es-dictionary 's step for
> converting an IDL dictionary type to an ECMAScript Object, except that
> instead of DefineOwnProperty, it's something like "construct an IDL
> value whose type is the type member is declared to be of and that
> represents the same value as member on source."

No, that doesn't quite work.  Defining this generically is a bit of a 
PITA.  For example if the dictionary member type is a typed array or 
"object" then you actually want to apply the structured cloning 
algorithm to it (and keep track of reference loops and the like like the 
HTML spec does).

If your dictionaries can contain types like that, then you have to deal 
with that, sadly.  And I guess they do.  :(

If we decide to take this approach, I'm happy to help write this part of 
the spec.  Especially since in the long term it should move into Web IDL 
anyway, as I said.

Received on Tuesday, 15 July 2014 01:30:57 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:17:23 UTC