compute-pressure icon indicating copy to clipboard operation
compute-pressure copied to clipboard

supportedSources should not have [SameObject]

Open rakuco opened this issue 1 year ago • 7 comments

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.

rakuco avatar Apr 26 '24 09:04 rakuco

FrozenArray is an object

kenchris avatar Apr 26 '24 09:04 kenchris

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

rakuco avatar Apr 26 '24 09:04 rakuco

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 avatar Apr 26 '24 09:04 kenchris

@foolip do you know?

kenchris avatar Apr 26 '24 10:04 kenchris

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.

rakuco avatar Apr 26 '24 10:04 rakuco

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.

foolip avatar Apr 26 '24 12:04 foolip

I've filed whatwg/webidl#1402.

rakuco avatar Apr 26 '24 14:04 rakuco