Re: Web IDL now uses mixin syntax, not "implements"

2019-09-25 Thread Christopher Mills
On Wed, Sep 25, 2019 at 6:43 PM Anne van Kesteren  wrote:

> On Wed, Sep 25, 2019 at 7:13 PM Christopher Mills 
> wrote:
> > Updated our WebIDL page to include this new information:
> >
> >
> https://developer.mozilla.org/en-US/docs/MDN/Contribute/Howto/Write_an_API_reference/Information_contained_in_a_WebIDL_file#Mixins
> >
> > Let me know if you'd rather see something different here.
>
> Thanks! I think my main suggestion would be to lead with the new
> syntax as that should soon be more common. We also do expect that
> eventually all specifications are updated. As part of updating syntax
> in the IDL specification downstream dependencies are notified of
> changes (and thanks to Kagami there's now an experiment of doing so in
> automated fashion for the constructor change).
>

OK, done!
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Web IDL now uses mixin syntax, not "implements"

2019-09-25 Thread Anne van Kesteren
On Wed, Sep 25, 2019 at 7:13 PM Christopher Mills  wrote:
> Updated our WebIDL page to include this new information:
>
> https://developer.mozilla.org/en-US/docs/MDN/Contribute/Howto/Write_an_API_reference/Information_contained_in_a_WebIDL_file#Mixins
>
> Let me know if you'd rather see something different here.

Thanks! I think my main suggestion would be to lead with the new
syntax as that should soon be more common. We also do expect that
eventually all specifications are updated. As part of updating syntax
in the IDL specification downstream dependencies are notified of
changes (and thanks to Kagami there's now an experiment of doing so in
automated fashion for the constructor change).
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Web IDL now uses mixin syntax, not "implements"

2019-09-25 Thread Christopher Mills
Updated our WebIDL page to include this new information:

https://developer.mozilla.org/en-US/docs/MDN/Contribute/Howto/Write_an_API_reference/Information_contained_in_a_WebIDL_file#Mixins

Let me know if you'd rather see something different here.

Chris Mills
MDN content lead & writers' team manager
Mozilla Developer Network 
@chrisdavidmills 


On Tue, Sep 24, 2019 at 6:20 PM Boris Zbarsky  wrote:

> The way mixins are done in IDL has changed syntax somewhat.  Instead of
> having a [NoInterfaceObject] interface and an "implements" statement,
> the new setup looks like this:
>
>interface A {};
>
>interface mixin B {
>  void somethingMixedIn();
>}
>
>A includes B;
>
> In-tree IDL has been updated to the new syntax.  Support for the old
> syntax has not been removed yet, but will be as soon as that patch is
> reviewed; please do not add new IDL using "implements".
>
> The new setup is a little less featureful: mixins have no inheritance
> and cannot include other mixins.  They _do_ support partials, so you can
> do:
>
>interface A {};
>interface mixin B {};
>partial interface mixin B {
>  void somethingMixedIn();
>};
>A includes B;
>
> A mixin and its partials have to in the same .webidl file, just like our
> existing rules for interfaces.  This is not enforced yet, but will be
> soon.  Similarly, the "A includes B" statement must be in the same
> .webidl file as the definition of interface A.  This part _is_ enforced.
>
> Mixins have somewhat restricted syntax compared to interfaces (e.g. do
> not allow mixing in constructors, getter/setter operations, iterable
> declarations, etc).  This should not be a problem in practice, and
> certainly wasn't for anything we had in-tree.
>
> -Boris
> ___
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform