mirror of
https://github.com/storytold/egui.git
synced 2026-11-25 03:53:35 +01:00
Improve warning when failing to copy on web
This commit is contained in:
1 parent
814eddd094
commit
e62bd7037a
1 file changed
+6
-1
@@ -172,7 +172,12 @@ fn set_clipboard_text(s: &str) {
|
||||
};
|
||||
wasm_bindgen_futures::spawn_local(future);
|
||||
} else {
|
||||
log::warn!("window.navigator.clipboard is null; can't copy text");
|
||||
let is_secure_context = window.is_secure_context();
|
||||
if is_secure_context {
|
||||
log::warn!("window.navigator.clipboard is null; can't copy text");
|
||||
} else {
|
||||
log::warn!("window.navigator.clipboard is null; can't copy text, probably because we're not in a secure context. See https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user