Merge pull request #139 from mondeja/docs-105

Fix `web_sys_unstable_apis` not passed to rustdoc
This commit is contained in:
Marc-Stefan Cassola 2024-07-27 18:56:03 +01:00 committed by GitHub
commit 24020805bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -1,3 +1,3 @@
[unstable]
[build]
rustflags = ["--cfg=web_sys_unstable_apis"]
rustdocflags = ["--cfg=web_sys_unstable_apis"]
rustdocflags = ["--cfg=web_sys_unstable_apis"]

View file

@ -11,7 +11,7 @@ use leptos::*;
/// Without user permission, reading or altering the clipboard contents is not permitted.
///
/// > This function requires `--cfg=web_sys_unstable_apis` to be activated as
/// [described in the wasm-bindgen guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html).
/// > [described in the wasm-bindgen guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html).
///
/// ## Demo
///
@ -89,7 +89,7 @@ pub fn use_clipboard_with_options(
};
if is_supported.get() && read {
let _ = use_event_listener(window(), copy, update_text.clone());
let _ = use_event_listener(window(), copy, update_text);
let _ = use_event_listener(window(), cut, update_text);
}