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

Editorial: add more examples #238

Merged
merged 1 commit into from Jun 7, 2022
Merged

Editorial: add more examples #238

merged 1 commit into from Jun 7, 2022

Conversation

marcoscaceres
Copy link
Member

@marcoscaceres marcoscaceres commented Jun 7, 2022

Closes #227
closes #211


Preview | Diff

@marcoscaceres marcoscaceres merged commit 45508be into main Jun 7, 2022
@marcoscaceres marcoscaceres deleted the examples branch June 7, 2022 04:44
};

// Things that are not supported...
const unsupported = Object.entries(data).filter(([key, value]) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an interesting workaround that supports single call (whatwg/webidl#107 (comment)):

let supported = false;
supported = navigator.canShare({
  title: "Example Page",
  url: "https://example.com",
  text: "This is a text to share",
  get someFutureThing() {
    supported = true;
    return "some future thing";
  }
}) && supported;

Hacky, yeah.

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.

Better describe intention of navigator.canShare() and usage
3 participants