Handle scale factor change on web-sys backend (#1690)
* Change web backend `event_handler` to without 'static lifetime * Refactor web runner and fix ControlFlow::Exit not being sticky * Impl. scaling change event for web-sys backend * Improve `dpi` docs regarding the web backend * Add changes to changelog * Update features.md
This commit is contained in:
parent
a2db4c0a32
commit
658a9a4ea8
12 changed files with 302 additions and 44 deletions
|
|
@ -72,8 +72,11 @@ impl<T> fmt::Debug for EventLoopWindowTarget<T> {
|
|||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
||||
pub enum ControlFlow {
|
||||
/// When the current loop iteration finishes, immediately begin a new iteration regardless of
|
||||
/// whether or not new events are available to process. For web, events are sent when
|
||||
/// `requestAnimationFrame` fires.
|
||||
/// whether or not new events are available to process.
|
||||
///
|
||||
/// For web, events are queued and usually sent when `requestAnimationFrame` fires but sometimes
|
||||
/// the events in the queue may be sent before the next `requestAnimationFrame` callback, for
|
||||
/// example when the scaling of the page has changed.
|
||||
Poll,
|
||||
/// When the current loop iteration finishes, suspend the thread until another event arrives.
|
||||
Wait,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue