compute-pressure
compute-pressure copied to clipboard
supportedSources should not have [SameObject]
https://webidl.spec.whatwg.org/#SameObject says
The [SameObject] extended attribute must not be used on anything other than a read only attribute whose type is an interface type or object.
supportedSources is a read-only attribute, but its type is not an interface type or object.
FrozenArray is an object
object in this case is https://webidl.spec.whatwg.org/#idl-object specifically. I don't think FrozenArray counts, but we could double check.
Not really sure where to double check that, but that would also explain why it has to be associated a global object (JavaScript realm)
@foolip do you know?
Not really sure where to double check that
It'd be good to file an issue in the Web IDL repository to ask about this. I can do that later if you don't beat me to it.
I think that as written the spec doesn't allow [SameObject] for FrozenArray but that seems unlikely to be intentional. A spec issue sounds good.
I've filed whatwg/webidl#1402.