Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update WebIDL definition(s) to use new mixin syntax #111

Closed
1 task
tobie opened this issue Nov 3, 2017 · 3 comments
Closed
1 task

Update WebIDL definition(s) to use new mixin syntax #111

tobie opened this issue Nov 3, 2017 · 3 comments

Comments

@tobie
Copy link
Member

tobie commented Nov 3, 2017

Hi all!

WebIDL recently introduced dedicated syntax for mixins.

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

You can read more about it here.

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;

Additonaly, a section on when to use partials and mixins has been added to the spec. It's short and might be worth a read.

It seems the following interfaces in this spec are impacted by this change:

  • CredentialUserData

We're sorry for the inconvenience this causes, but our hope is that this ultimately makes things simpler and clearer for everybody.

As always, please feel free to reach out if you have any questions.

Thanks!


Tracked in: whatwg/webidl#472 | Original pull-request: whatwg/webidl#433

@tobie tobie mentioned this issue Nov 3, 2017
4 tasks
@mikewest
Copy link
Member

This is a pretty trivial change, but Bikeshed throws fatal errors when parsing the new IDL syntax:

FATAL ERROR: IDL SYNTAX ERROR LINE: 1 - skipped: "[SecureContext]
interface mixin CredentialUserData {
  readonly attribute USVString name;
  readonly attribute USVString iconURL;
}"
FATAL ERROR: IDL SYNTAX ERROR LINE: 10 - skipped: "PasswordCredential includes CredentialUserData"
FATAL ERROR: IDL SYNTAX ERROR LINE: 8 - skipped: "FederatedCredential includes CredentialUserData"
FATAL ERROR: Couldn't find target attribute 'name':
<span data-attribute-info="" for="CredentialUserData/name"></span>
FATAL ERROR: Couldn't find target attribute 'iconURL':
<span data-attribute-info="" for="CredentialUserData/iconURL"></span>

It looks like you've already filed speced/bikeshed#1124, so I'll just wait for that to get fixed before addressing this.

@marcoscaceres
Copy link
Member

Friendly ping.

@marcoscaceres
Copy link
Member

@mikewest or other WG members, another friendly ping. speced/bikeshed#1124 is fixed, and this is blocking a couple of other projects that want to get rid of "implements". Could you kindly make this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants