- From: Shiino Yuki <notifications@github.com>
- Date: Tue, 22 May 2018 05:57:19 -0700
- To: heycam/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 22 May 2018 12:57:41 UTC
I'm wondering if there is a way to describe a signature of [IDL callback function as a constructor](https://heycam.github.io/webidl/#construct-a-callback-function). We can tell the types of the arguments list for [invoke](https://heycam.github.io/webidl/#invoke-a-callback-function) from the declaration in IDL. ``` callback Foo = void(DOMString arg1); ``` But how can we tell the types of the arguments list for [construct](https://heycam.github.io/webidl/#construct-a-callback-function)? If there is no way, then I'd like to apply [Constructor] extended attribute to IDL callback functions. ``` [Constructor(DOMString ctor_arg1)] callback Foo = void(DOMString arg1); ``` FYI, [CustomElementRegistry.define](https://html.spec.whatwg.org/multipage/custom-elements.html#customelementregistry) takes |constructor| of type |Function|, where there is no type information about the constructor arguments. Explicit type information in IDL is helpful for user agent implementor, I think. -- 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/557
Received on Tuesday, 22 May 2018 12:57:41 UTC