You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ConstrainablePattern uses the [NoInterfaceObject] extended attribute, yet it's not a mixin, nor does it seem to need to do so for legacy compat reasons, which is now the only legit reason to use this extended attribute.
I suggest replacing the ConstrainablePattern interface's [NoInterfaceObject] extended attribute with the [Exposed] extended attribute, specifying the globals on which it should be exposed.
The text was updated successfully, but these errors were encountered:
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."
Oh, I see. If that's not a concern for implementors (i.e. if they're not pulling this in by accident despite it not being in use anywhere), I guess that's fine.
ConstrainablePattern
uses the[NoInterfaceObject]
extended attribute, yet it's not a mixin, nor does it seem to need to do so for legacy compat reasons, which is now the only legit reason to use this extended attribute.I suggest replacing the
ConstrainablePattern
interface's[NoInterfaceObject]
extended attribute with the[Exposed]
extended attribute, specifying the globals on which it should be exposed.The text was updated successfully, but these errors were encountered: