22 lines
443 B
Rust
22 lines
443 B
Rust
mod canvas;
|
|
mod document;
|
|
mod event;
|
|
mod timeout;
|
|
|
|
pub use self::canvas::Canvas;
|
|
pub use self::document::Document;
|
|
pub use self::timeout::Timeout;
|
|
|
|
use crate::platform::web::WindowExtWebSys;
|
|
use crate::window::Window;
|
|
use web_sys::HtmlCanvasElement;
|
|
|
|
pub fn throw(msg: &str) {
|
|
wasm_bindgen::throw_str(msg);
|
|
}
|
|
|
|
impl WindowExtWebSys for Window {
|
|
fn canvas(&self) -> HtmlCanvasElement {
|
|
self.window.canvas().raw().clone()
|
|
}
|
|
}
|