From 6d46833eb2a068bd3655859ea828dad04293e5ba Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 4 Feb 2020 03:28:47 +0100 Subject: Support event subscriptions in `iced_web` Also improves the overall web runtime, avoiding nested update loops. --- src/application.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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) { let (app, command) = A::new(); @@ -248,6 +249,10 @@ where self.0.update(message) } + fn subscription(&self) -> Subscription { + self.0.subscription() + } + fn view(&mut self) -> Element<'_, Self::Message> { self.0.view() } -- cgit