Re: [mediacapture-main] Why is ConstrainablePattern using [NoInterfaceObject]?

This was done because (at least at the time we did this) the ConstrainablePattern can't be inherited from, due to the way WebIDL does inheritance.
Instead, each instance of the Constrainable pattern has to define the operations anew, without using inheritance to express the commonality.
Thus, [Nointerface] is used as a heads-up more than anything else: "You can syntax-check this IDL, but embedding it in a browser is useless, since it won't do anything".

To quote from section 11.1 of the spec:

"Although this specification formally defines ConstrainablePattern as a WebIDL interface, it is actually a template or pattern for other interfaces and cannot be inherited directly since the return values of the methods need to be extended, something WebIDL cannot do."



-- 
GitHub Notification of comment by alvestrand
Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/501#issuecomment-352439151 using your GitHub account

Received on Monday, 18 December 2017 14:23:30 UTC