- From: Boris Zbarsky <notifications@github.com>
- Date: Thu, 12 Dec 2019 09:55:04 -0800
- To: heycam/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 12 December 2019 17:55:06 UTC
Hmm. That would be one option. The other would be to: 1) Define a concept of "type A that may be type B" which would then be defined to do sane things for unions and nullables. 2) Allow `[AllowShared]` on any type that may be a buffer source type. That's equivalent to the proposal in https://github.com/heycam/webidl/issues/827#issuecomment-565102739 as far as observable behavior for `[AllowShared] ArrayBufferView` and also allows `[AllowShared] ArrayBufferView?`, though we would need some changes to https://heycam.github.io/webidl/#idl-type-extended-attribute-associated-with to propagate through nullables. It seems like we should do that, since fundamentally `?` is pretty much like a union type but with different syntax... If we wanted to also allow `[AllowShared] (ArrayBuffer or DOMString)` we could fix union propagation to only propagate if the extended attr applies to the inner type, right? I don't really see a reason to forbid it... -- 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/827#issuecomment-565115027
Received on Thursday, 12 December 2019 17:55:06 UTC