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

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.

-Boris

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