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

On Mon, Jul 14, 2014 at 3:45 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

>
>  "Whatever makes everyone happy" ;)
>>
>
> I want a unicorn too!  ;)
>
> Seriously, I think we'll get somewhere here.  I really do.
>
> Just to make sure we're on the same page, by the way, do the dictionaries
> coming from CryptoKey.algorithm ever have missing properties, or are they
> always completely filled in?
>
>
They're always completely filled in by the time normalization &
construction of the CryptoKey has happened, and they're immutable then and
forever more. Which is nice.


> Well, IDL could define it generically.  But you could define how to clone
> your particular dictionaries specifically.


Which is more or less what I'm already doing for the "copy an
ArrayBufferView" bit.

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."

This covers the primitives (DOMString, bool, numerics), but presumably gets
grotty around object-sub-objects, which may involve some more magic
hand-waving.

Received on Monday, 14 July 2014 23:11:36 UTC