Support event subscriptions in iced_web
Also improves the overall web runtime, avoiding nested update loops.
This commit is contained in:
parent
f5186f31f1
commit
6d46833eb2
12 changed files with 112 additions and 129 deletions
|
|
@ -233,6 +233,7 @@ where
|
|||
A: Application,
|
||||
{
|
||||
type Message = A::Message;
|
||||
type Executor = A::Executor;
|
||||
|
||||
fn new() -> (Self, Command<A::Message>) {
|
||||
let (app, command) = A::new();
|
||||
|
|
@ -248,6 +249,10 @@ where
|
|||
self.0.update(message)
|
||||
}
|
||||
|
||||
fn subscription(&self) -> Subscription<Self::Message> {
|
||||
self.0.subscription()
|
||||
}
|
||||
|
||||
fn view(&mut self) -> Element<'_, Self::Message> {
|
||||
self.0.view()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue