summaryrefslogtreecommitdiffstats
path: root/src/application.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-02-04 03:28:47 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-02-04 03:28:47 +0100
commit6d46833eb2a068bd3655859ea828dad04293e5ba (patch)
tree42cbe1d9a65a2e03e63887611251ed8532f49872 /src/application.rs
parentf5186f31f1e5eed8fe20c5d6e62e2f531fee6365 (diff)
downloadiced-6d46833eb2a068bd3655859ea828dad04293e5ba.tar.gz
iced-6d46833eb2a068bd3655859ea828dad04293e5ba.tar.bz2
iced-6d46833eb2a068bd3655859ea828dad04293e5ba.zip
Support event subscriptions in `iced_web`
Also improves the overall web runtime, avoiding nested update loops.
Diffstat (limited to 'src/application.rs')
-rw-r--r--src/application.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/application.rs b/src/application.rs
index 3a526f1b..926a2986 100644
--- a/src/application.rs
+++ b/src/application.rs
@@ -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()
}