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

web-sys 0.70 issue #4958

Closed
taiyoungjang opened this issue Aug 14, 2024 · 3 comments · Fixed by #4980
Closed

web-sys 0.70 issue #4958

taiyoungjang opened this issue Aug 14, 2024 · 3 comments · Fixed by #4980
Labels
bug Something is broken

Comments

@taiyoungjang
Copy link

Describe the bug

To Reproduce
Steps to reproduce the behavior:

Expected behavior

Screenshots

Desktop (please complete the following information):

  • OS:
  • Browser
  • Version

Smartphone (please complete the following information):

  • Device:
  • OS:
  • Browser
  • Version

Additional context

fn set_clipboard_text(s: &str) {
if let Some(window) = web_sys::window() {
if let Some(clipboard) = window.navigator().clipboard() {

changed function return type:
window.navigator().clipboard() -> Clipboard

@taiyoungjang taiyoungjang added the bug Something is broken label Aug 14, 2024
@bircni
Copy link
Contributor

bircni commented Aug 14, 2024

Please fill out the description - this doesn't help

@taiyoungjang
Copy link
Author

sorry! i try this. raise error
crates use web-sys 0.70

trunk build

error[E0308]: mismatched types
--> C:\Users\Admin.cargo\registry\src\index.crates.io-6f17d22bba15001f\eframe-0.28.1\src\web\mod.rs:187:16
|
187 | if let Some(clipboard) = window.navigator().clipboard() {
| ^^^^^^^^^^^^^^^ ------------------------------ this expression has type Clipboard
| |
| expected Clipboard, found Option<_>
|
= note: expected struct Clipboard
found enum std::option::Option<_>

@bircni
Copy link
Contributor

bircni commented Aug 15, 2024

This was also raised in #4961 and already fixed in a PullRequest #4954

emilk pushed a commit that referenced this issue Aug 26, 2024
This PR updates web-sys & wasm to the newest version.

(this was already part of the POC #4954 )

* Closes <#4961>
* Closes <#4958>
* [x] I have followed the instructions in the PR template
486c pushed a commit to 486c/egui that referenced this issue Oct 9, 2024
This PR updates web-sys & wasm to the newest version.

(this was already part of the POC emilk#4954 )

* Closes <emilk#4961>
* Closes <emilk#4958>
* [x] I have followed the instructions in the PR template
hacknus pushed a commit to hacknus/egui that referenced this issue Oct 30, 2024
This PR updates web-sys & wasm to the newest version.

(this was already part of the POC emilk#4954 )

* Closes <emilk#4961>
* Closes <emilk#4958>
* [x] I have followed the instructions in the PR template
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants