[whatwg/webidl] [SameObject]/[NewObject] should be allowed on unions and other objects (Issue #1077)

This is extracted from #71 which discusses extending `[SameObject]`/`[NewObject]` to types other than Promises:
> It should be allowed if the return value is any object type. Specifically, any interface type, "object", ~a promise,~ an Error, a DOMException, any buffer source type, or a union of types on which [NewObject] is allowed.

WebGPU in particular wants to use this on a `readonly attribute` with a union type. https://github.com/gpuweb/gpuweb/issues/1225

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/issues/1077
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/webidl/issues/1077@github.com>

Received on Thursday, 16 December 2021 20:25:21 UTC