[heycam/webidl] Define a callback constructor type (#701)

In particular something we verify to be a callback that also passes https://tc39.github.io/ecma262/#sec-isconstructor.

This could be used to remove the first step of https://html.spec.whatwg.org/multipage/custom-elements.html#dom-customelementregistry-define.

It would also help https://github.com/WebAudio/web-audio-api/pull/1843 and other Worklet APIs dealing with constructors.

Invoking the constructor would go through https://heycam.github.io/webidl/#construct-a-callback-function though that can be tightened up a bit by no longer having to check that it's a constructor.

-- 
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/701

Received on Monday, 1 April 2019 13:55:54 UTC