2019-08-14 18:20:05 +10:00
|
|
|
#![cfg(target_arch = "wasm32")]
|
|
|
|
|
2019-07-02 04:43:54 +10:00
|
|
|
#[cfg(feature = "stdweb")]
|
2019-06-25 11:15:34 +10:00
|
|
|
use stdweb::web::html_element::CanvasElement;
|
|
|
|
|
2019-07-02 04:43:54 +10:00
|
|
|
#[cfg(feature = "stdweb")]
|
2019-06-25 11:15:34 +10:00
|
|
|
pub trait WindowExtStdweb {
|
|
|
|
fn canvas(&self) -> CanvasElement;
|
|
|
|
}
|
|
|
|
|
2019-07-02 04:43:54 +10:00
|
|
|
#[cfg(feature = "web-sys")]
|
2019-06-25 11:15:34 +10:00
|
|
|
use web_sys::HtmlCanvasElement;
|
|
|
|
|
2019-07-02 04:43:54 +10:00
|
|
|
#[cfg(feature = "web-sys")]
|
2019-06-25 11:15:34 +10:00
|
|
|
pub trait WindowExtWebSys {
|
|
|
|
fn canvas(&self) -> HtmlCanvasElement;
|
|
|
|
}
|