Re: [heycam/webidl] Can FrozenArray<T> be used for a mutable attribute? (#265)

I mean, I guess we can have the general discussion about whether we _should_ allow writable FrozenArray attributes or whether they lead to bad API.

In this case, it's certainly leading to a bad spec, because the way the setter for this attribute is defined is:

>  On setting, it MUST run the convert artwork algorithm with the new value as input, and set the MediaMetadata's artwork images as the result if it succeeded. 

OK, but what is the new value?  The new value is the output of the steps at https://heycam.github.io/webidl/#es-frozen-array (why do we not have a #es-to-frozen-array?) and hence is an ES Array object that has been frozen.  OK, so we call into https://wicg.github.io/mediasession/#convert-artwork-algorithm and it does "for each entry in input's artwork" which is really not defined at all (in multiple ways; I think the spec editor got confused about what the type of the incoming thing is).  This spec would be much better served by having a sequence there as the input; it would be harder to screw up.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/265#issuecomment-272188394

Received on Thursday, 12 January 2017 15:13:10 UTC