W3C home > Mailing lists > Public > public-html-media@w3.org > June 2016

[media-source] TrackDefault.kinds attribute cannot have type sequence<DOMString>

From: François Daoust via GitHub <sysbot+gh@w3.org>
Date: Wed, 08 Jun 2016 10:33:38 +0000
To: public-html-media@w3.org
Message-ID: <issues.opened-159131643-1465382017-sysbot+gh@w3.org>
tidoust has just created a new issue for 

== TrackDefault.kinds attribute cannot have type sequence<DOMString> 
(Note: I'm creating a new issue but this basically reopens #68)

Using a `sequence<DOMString>` type for `TrackDefault.kinds` is not 
possible in practice. All versions of WebIDL explicitly forbid the use
 of `sequence<T>` types for attributes (because sequences are passed 
by value, not by reference, which is probably not what you want here):

> Sequences MUST NOT be used as the type of an attribute or constant. 
> http://heycam.github.io/webidl/#idl-sequence

Among other things, this makes the IDL test harness complain that the 
IDL definition is invalid.

Since `TrackDefault.kinds` is `readonly`, I suspect that you would 
rather want to use a `FrozenArray<DOMString>` type... but this type is
 only defined in "Web IDL (Second Edition)" for the time being:

I do not know how to do the same thing if you stick to WebIDL Level 1.
 That seems impossible to do since without the array type... 
@plehegar, do you know if that's intended and if there's another way?

Please view or discuss this issue at 
https://github.com/w3c/media-source/issues/91 using your GitHub 
Received on Wednesday, 8 June 2016 10:33:40 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 15:49:09 UTC