w3c / compute-pressure

A web API proposal that provides information about available compute capacity
https://www.w3.org/TR/compute-pressure/
Other
69 stars 10 forks source link

supportedSources should not have [SameObject] #269

Open rakuco opened 7 months ago

rakuco commented 7 months ago

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.

kenchris commented 7 months ago

FrozenArray is an object

rakuco commented 7 months ago

object in this case is https://webidl.spec.whatwg.org/#idl-object specifically. I don't think FrozenArray counts, but we could double check.

kenchris commented 7 months ago

Not really sure where to double check that, but that would also explain why it has to be associated a global object (JavaScript realm)

kenchris commented 7 months ago

@foolip do you know?

rakuco commented 7 months ago

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.

foolip commented 7 months ago

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.

rakuco commented 7 months ago

I've filed whatwg/webidl#1402.