Display all platform-specific documentation on docs.rs (#3076)
This commit is contained in:
parent
8b3de7cedf
commit
42dbc4748e
28 changed files with 810 additions and 814 deletions
|
|
@ -35,8 +35,13 @@ use crate::platform_impl::PlatformCustomCursorBuilder;
|
|||
use crate::window::CustomCursor;
|
||||
use crate::window::{Window, WindowBuilder};
|
||||
|
||||
#[cfg(wasm_platform)]
|
||||
use web_sys::HtmlCanvasElement;
|
||||
|
||||
#[cfg(not(wasm_platform))]
|
||||
#[doc(hidden)]
|
||||
pub struct HtmlCanvasElement;
|
||||
|
||||
pub trait WindowExtWebSys {
|
||||
/// Only returns the canvas if called from inside the window context (the
|
||||
/// main thread).
|
||||
|
|
@ -80,6 +85,11 @@ pub trait WindowBuilderExtWebSys {
|
|||
/// In any case, the canvas won't be automatically inserted into the web page.
|
||||
///
|
||||
/// [`None`] by default.
|
||||
#[cfg_attr(
|
||||
not(wasm_platform),
|
||||
doc = "",
|
||||
doc = "[`HtmlCanvasElement`]: #only-available-on-wasm"
|
||||
)]
|
||||
fn with_canvas(self, canvas: Option<HtmlCanvasElement>) -> Self;
|
||||
|
||||
/// Sets whether `event.preventDefault()` should be called on events on the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue