On Web there are currently a bunch of ways to implement ControlFlow::Poll, they each have different tradeoffs. Unfortunately there is currently no way to add platform-specific functionality to ControlFlow the way usually Winit does: with extension traits.
My proposal to solve this problem is to make ControlFlow a struct, internally it would probably still use an enum, but the point is to make that private so we can add platform-specific functionality through extension traits. It already provides methods to set the ControlFlow.
Happy to do the PR for all platforms.
EDIT: See #3042 (comment), which is an even better solution imo.
On Web there are currently a bunch of ways to implement
ControlFlow::Poll, they each have different tradeoffs. Unfortunately there is currently no way to add platform-specific functionality toControlFlowthe way usually Winit does: with extension traits.My proposal to solve this problem is to make
ControlFlowa struct, internally it would probably still use an enum, but the point is to make that private so we can add platform-specific functionality through extension traits. It already provides methods to set theControlFlow.Happy to do the PR for all platforms.
EDIT: See #3042 (comment), which is an even better solution imo.