W3C home > Mailing lists > Public > public-media-capture-logs@w3.org > December 2017

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

From: Harald Alvestrand via GitHub <sysbot+gh@w3.org>
Date: Mon, 18 Dec 2017 14:23:29 +0000
To: public-media-capture-logs@w3.org
Message-ID: <issue_comment.created-352439151-1513607008-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:27:33 UTC