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

How to get navigator.clipboard? #2097

Closed
vojta7 opened this issue Apr 21, 2020 · 1 comment
Closed

How to get navigator.clipboard? #2097

vojta7 opened this issue Apr 21, 2020 · 1 comment
Labels

Comments

@vojta7
Copy link
Contributor

vojta7 commented Apr 21, 2020

Summary

I would like to access Clipboard API, but I don't see it mentioned anywhere in the documentation and the following code fails.

window().navigator().clipboard()

with this error

no method named `clipboard` found for struct `web_sys::features::gen_Navigator::Navigator` in the current scope

Additional Details

I tried to enable experimentall features, but it had no effect.

@Pauan
Copy link
Contributor

Pauan commented Apr 21, 2020

@vojta7 Clipboard is an unstable API. We only add unstable APIs on an ad-hoc basis, so we would gladly accept a pull request adding it in.

@vojta7 vojta7 mentioned this issue Apr 22, 2020
@vojta7 vojta7 closed this as completed Apr 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants