/// Defines the JS message handler callback.
Defines the JS message handler callback.
Defines the JS message handler callback .
pub fn invoke_handler<
    T: futures::Future<Output = crate::Result<()>> + Send + Sync + 'static,
    F: Fn(WebviewManager<A::Dispatcher>, String) -> T + Send + Sync + 'static,
  >(
    mut self,
    invoke_handler: F,
  ) -> Self {
    self.invoke_handler = Some(Box::new(move |webview_manager, arg| {
      Box::pin(invoke_handler(webview_manager, arg))
    }));
    self
  }
pub fn invoke_handler < T : futures :: Future < Output = crate :: Result < ( ) > > + Send + Sync + ' static , F : Fn ( WebviewManager < A :: Dispatcher > , String ) -> T + Send + Sync + ' static , > ( mut self , invoke_handler : F , ) -> Self { self . invoke_handler = Some ( Box :: new ( move | webview_manager , arg | { Box :: pin ( invoke_handler ( webview_manager , arg ) ) } ) ) ; self }
Defines the JS message handler callback.
Defines the JS message handler callback .
mut self
invoke_handler
F