Bug 179249 - [WebIDL] add support for mixins
Summary: [WebIDL] add support for mixins
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Bindings (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-03 11:24 PDT by Tobie Langel
Modified: 2017-11-03 13:07 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobie Langel 2017-11-03 11:24:37 PDT
Hi all!

WebIDL recently introduced dedicated syntax for mixins[0].

This syntax replaces the [NoInterfaceObject] extended attribute and "implements statement" which have been deprecated (except for a few legacy uses cases explicitly mentioned in the spec[1]).

You can read more about it in the spec[2].

In most cases, the changes should be relatively straightforward. The now deprecated:

    interface Foo { };

    [NoInterfaceObject]  // (Mostly) DEPRECATED
    interface Bar { };
    Foo implementes Bar; // DEPRECATED


should just be rewritten as:

    interface Foo { };
    
    interface mixin Bar { };
    Foo includes Bar;

Please feel free to reach out if you have any questions.

Thanks!

[0]: https://github.com/heycam/webidl/commit/45e8173d40ddff8dcf81697326e094bcf8b92920
[1]: https://heycam.github.io/webidl/#NoInterfaceObject
[2]: https://heycam.github.io/webidl/#idl-interface-mixins

This is tracked in: https://github.com/heycam/webidl/issues/472
The original pull-request: https://github.com/heycam/webidl/pull/433