On Web, implement Send and Sync where appropriate (#2834)
This commit is contained in:
parent
eb2d3894ef
commit
8f7f3efc0d
21 changed files with 609 additions and 196 deletions
|
|
@ -12,7 +12,8 @@ use crate::window::WindowBuilder;
|
|||
use web_sys::HtmlCanvasElement;
|
||||
|
||||
pub trait WindowExtWebSys {
|
||||
fn canvas(&self) -> HtmlCanvasElement;
|
||||
/// Only returns the canvas if called from inside the window.
|
||||
fn canvas(&self) -> Option<HtmlCanvasElement>;
|
||||
|
||||
/// Whether the browser reports the preferred color scheme to be "dark".
|
||||
fn is_dark_mode(&self) -> bool;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue