pub fn build(mut self) -> crate::Result<Window<R>> {
    let web_resource_request_handler = self.web_resource_request_handler.take();
    let pending = PendingWindow::new(
      self.window_builder.clone(),
      self.webview_attributes.clone(),
      self.label.clone(),
    )?;
    let labels = self.manager().labels().into_iter().collect::<Vec<_>>();
    let pending = self.manager().prepare_window(
      self.managed_app_handle(),
      pending,
      &labels,
      web_resource_request_handler,
    )?;
    let window = match self.runtime() {
      RuntimeOrDispatch::Runtime(runtime) => runtime.create_window(pending),
      RuntimeOrDispatch::RuntimeHandle(handle) => handle.create_window(pending),
      RuntimeOrDispatch::Dispatch(mut dispatcher) => dispatcher.create_window(pending),
    }
    .map(|window| {
      self
        .manager()
        .attach_window(self.managed_app_handle(), window)
    })?;

    self.manager().emit_filter(
      "tauri://window-created",
      None,
      Some(WindowCreatedEvent {
        label: window.label().into(),
      }),
      |w| w != &window,
    )?;

    Ok(window)
  }
/// Creates a new webview window.
Creates a new webview window.
Creates a new webview window .
pub fn build(mut self) -> crate::Result<Window<R>> {
    let web_resource_request_handler = self.web_resource_request_handler.take();
    let pending = PendingWindow::new(
      self.window_builder.clone(),
      self.webview_attributes.clone(),
      self.label.clone(),
    )?;
    let labels = self.manager().labels().into_iter().collect::<Vec<_>>();
    let pending = self.manager().prepare_window(
      self.managed_app_handle(),
      pending,
      &labels,
      web_resource_request_handler,
    )?;
    let window = match self.runtime() {
      RuntimeOrDispatch::Runtime(runtime) => runtime.create_window(pending),
      RuntimeOrDispatch::RuntimeHandle(handle) => handle.create_window(pending),
      RuntimeOrDispatch::Dispatch(mut dispatcher) => dispatcher.create_window(pending),
    }
    .map(|window| {
      self
        .manager()
        .attach_window(self.managed_app_handle(), window)
    })?;
    self.manager().emit_filter(
      "tauri://window-created",
      None,
      Some(WindowCreatedEvent {
        label: window.label().into(),
      }),
      |w| w != &window,
    )?;
    Ok(window)
  }
pub fn build ( mut self ) -> crate :: Result < Window < R > > { let web_resource_request_handler = self . web_resource_request_handler . take ( ) ; let pending = PendingWindow :: new ( self . window_builder . clone ( ) , self . webview_attributes . clone ( ) , self . label . clone ( ) , ) ? ; let labels = self . manager ( ) . labels ( ) . into_iter ( ) . collect :: < Vec < _ > > ( ) ; let pending = self . manager ( ) . prepare_window ( self . managed_app_handle ( ) , pending , & labels , web_resource_request_handler , ) ? ; let window = match self . runtime ( ) { RuntimeOrDispatch :: Runtime ( runtime ) => runtime . create_window ( pending ) , RuntimeOrDispatch :: RuntimeHandle ( handle ) => handle . create_window ( pending ) , RuntimeOrDispatch :: Dispatch ( mut dispatcher ) => dispatcher . create_window ( pending ) , } . map ( | window | { self . manager ( ) . attach_window ( self . managed_app_handle ( ) , window ) } ) ? ; self . manager ( ) . emit_filter ( " " , None , Some ( WindowCreatedEvent { label : window . label ( ) . into ( ) , } ) , | w | w != & window , ) ? ; Ok ( window ) }
Creates a new webview window.
Creates a new webview window .
mut self
mut self