Expand description
§Web
The officially supported browsers are Chrome, Firefox and Safari 13.1+, though forks of these should work fine.
Winit supports compiling to the wasm32-unknown-unknown
target with
web-sys
.
On the web platform, a Winit window is backed by a <canvas>
element. You
can either provide Winit with a <canvas>
element, or
let Winit create a <canvas>
element which you can then retrieve
and insert it into the DOM yourself.
Currently, there is no example code using Winit on Web, see #3473. For information on using Rust on WebAssembly, check out the Rust and WebAssembly book.
§CSS properties
It is recommended not to apply certain CSS properties to the canvas:
The following APIs can’t take them into account and will therefore provide inaccurate results:
Structs§
Enums§
- An error produced when using
CustomCursor::from_animation
with invalid arguments. - Strategy used for
ControlFlow::Poll
.
Traits§
- Additional methods on
EventLoop
that are specific to the web.