Implement stdweb backend for web platform
This commit is contained in:
parent
1596cc5d9e
commit
bb285984da
10 changed files with 355 additions and 906 deletions
|
|
@ -1,15 +1,15 @@
|
|||
#[cfg(feature = "stdweb")]
|
||||
#[cfg(feature = "use_stdweb")]
|
||||
use stdweb::web::html_element::CanvasElement;
|
||||
|
||||
#[cfg(feature = "stdweb")]
|
||||
#[cfg(feature = "use_stdweb")]
|
||||
pub trait WindowExtStdweb {
|
||||
fn canvas(&self) -> CanvasElement;
|
||||
}
|
||||
|
||||
#[cfg(feature = "web-sys")]
|
||||
#[cfg(feature = "use_web-sys")]
|
||||
use web_sys::HtmlCanvasElement;
|
||||
|
||||
#[cfg(feature = "web-sys")]
|
||||
#[cfg(feature = "use_web-sys")]
|
||||
pub trait WindowExtWebSys {
|
||||
fn canvas(&self) -> HtmlCanvasElement;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue