Add warning if `window.navigator.clipboard` is null

This commit is contained in:
Emil Ernerfeldt 2024-06-28 08:21:41 +02:00
parent f50e64632e
commit 814eddd094
1 changed files with 2 additions and 0 deletions

View File

@ -171,6 +171,8 @@ fn set_clipboard_text(s: &str) {
}
};
wasm_bindgen_futures::spawn_local(future);
} else {
log::warn!("window.navigator.clipboard is null; can't copy text");
}
}
}