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

fix: default share(data) to empty dictionary #111

Merged
merged 2 commits into from
Jul 8, 2019

Conversation

marcoscaceres
Copy link
Member

fixes #109

@marcoscaceres
Copy link
Member Author

We probably don't need the note anymore because now it's clear from the IDL that at least {} is always present. Now the algorithm always makes sense :)

@marcoscaceres marcoscaceres merged commit 1c89e76 into master Jul 8, 2019
@marcoscaceres marcoscaceres deleted the marcoscaceres-patch-1 branch July 8, 2019 07:23
@marcoscaceres
Copy link
Member Author

marcoscaceres commented Jul 8, 2019

I can’t recall if the IDL changes are automatically picked up on WPT. Also, any idea if whatwg/webidl#750 is implemented in Blink yet?... I’m guessing not, but we should probably track that.

@ewilligers
Copy link
Collaborator

any idea if whatwg/webidl#750 is implemented in Blink yet?

No.

boolean canShare(optional ShareData data = {});
Promise<void> share(optional ShareData data = {});

gives

navigator_share.idl(12) : error: Unexpected "{" after "=".
navigator_share.idl(15) : error: Unexpected "{" after "=".

@marcoscaceres
Copy link
Member Author

WPT also hasn’t updated to the latest version of WebIDL2.js, which includes support for this. Should hopefully happen by end of the week.

Do we have a Chrome bug we can track? Should we file one?

@ewilligers
Copy link
Collaborator

Chrome bug for dictionaries with no required members:
https://bugs.chromium.org/p/chromium/issues/detail?id=948139

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

Successfully merging this pull request may close these issues.

why "optional" in share(optional ShareData data)?
2 participants