diff --git a/src/html/mod.rs b/src/html/mod.rs
index b18cf6b4d7f..26772ec3a68 100644
--- a/src/html/mod.rs
+++ b/src/html/mod.rs
@@ -411,7 +411,7 @@ where
closure.into()
}
- #[cfg(all(target_arch = "wasm32", not(target_os="wasi"), not(cargo_web)))]
+ #[cfg(all(target_arch = "wasm32", not(target_os = "wasi"), not(cargo_web)))]
/// This method processes a Future that returns a message and sends it back to the component's
/// loop.
///
@@ -441,6 +441,15 @@ where
pub fn send_self(&mut self, msg: COMP::Message) {
self.scope.send_message(msg);
}
+
+ /// Sends a batch of messages to the component to be processed immediately after
+ /// the component has been updated and/or rendered..
+ ///
+ /// All messages will first be processed by `update`, and if _any_ of them return `true`,
+ /// then re-render will occur.
+ pub fn send_self_batch(&mut self, msgs: Vec) {
+ self.scope.send_message_batch(msgs)
+ }
}
impl fmt::Debug for ComponentLink {