Fix cargo test --workspace, associated feature flags, and a number of doctests

This commit is contained in:
Jonathan Kelley committed 2025-06-23 14:33:25 -07:00
1 parent fdd77d79c1
commit 8df53df887
11 files changed
+218 -187

No files matched your search

+13 -2
View File
@@ -117,12 +117,14 @@ impl DesktopService {
/// }
/// }
///
/// # async fn app() {
/// // Create a new window with a component that will be rendered in the new window.
/// let dom = VirtualDom::new(popup);
/// // Create and wait for the window
/// let window = dioxus::desktop::window().new_window(dom, Default::default()).await;
/// // Fullscreen the new window
/// window.set_fullscreen(true);
/// # }
/// ```
// Note: This method is asynchronous because webview2 does not support creating a new window from
// inside of an existing webview callback. Dioxus runs event handlers synchronously inside of a webview
@@ -323,12 +325,21 @@ fn is_main_thread() -> bool {
/// A [`DesktopContext`] that is pending creation.
///
/// # Example
/// ```rust
/// ```rust, no_run
/// # use dioxus::prelude::*;
/// # async fn app() {
/// // Create a new window with a component that will be rendered in the new window.
/// let dom = VirtualDom::new(|| rsx!{ "popup!" });
///
/// // Create a new window asynchronously
/// let pending_context = desktop_service.new_window(dom, config);
/// let pending_context = dioxus::desktop::window().new_window(dom, Default::default());
///
/// // Wait for the context to be created
/// let window = pending_context.await;
///
/// // Now control the window
/// window.set_fullscreen(true);
/// # }
/// ```
pub struct PendingDesktopContext {
pub(crate) receiver: tokio::sync::oneshot::Receiver<DesktopContext>,