winit-sonoma-fix/src/platform/web.rs

16 lines
349 B
Rust
Raw Normal View History

#[cfg(feature = "use_stdweb")]
2019-06-25 11:15:34 +10:00
use stdweb::web::html_element::CanvasElement;
#[cfg(feature = "use_stdweb")]
2019-06-25 11:15:34 +10:00
pub trait WindowExtStdweb {
fn canvas(&self) -> CanvasElement;
}
#[cfg(feature = "use_web-sys")]
2019-06-25 11:15:34 +10:00
use web_sys::HtmlCanvasElement;
#[cfg(feature = "use_web-sys")]
2019-06-25 11:15:34 +10:00
pub trait WindowExtWebSys {
fn canvas(&self) -> HtmlCanvasElement;
}