diff --git a/core/tauri-utils/src/config.rs b/core/tauri-utils/src/config.rs index d99b71827..642cc3fa2 100644 --- a/core/tauri-utils/src/config.rs +++ b/core/tauri-utils/src/config.rs @@ -29,7 +29,7 @@ pub mod parse; pub use self::parse::parse; -/// The window webview URL options. +/// An URL to open on a Tauri webview window. #[derive(PartialEq, Debug, Clone, Deserialize, Serialize)] #[cfg_attr(feature = "schema", derive(JsonSchema))] #[serde(untagged)] diff --git a/core/tauri/src/app.rs b/core/tauri/src/app.rs index 3eba53cc8..a3a664eee 100644 --- a/core/tauri/src/app.rs +++ b/core/tauri/src/app.rs @@ -357,6 +357,8 @@ macro_rules! shared_app_impl { ($app: ty) => { impl $app { /// Creates a new webview window. + /// + /// Data URLs are only supported with the `window-data-url` feature flag. pub fn create_window( &self, label: impl Into, diff --git a/core/tauri/src/window.rs b/core/tauri/src/window.rs index de323bb67..a625f4e0a 100644 --- a/core/tauri/src/window.rs +++ b/core/tauri/src/window.rs @@ -179,6 +179,8 @@ impl Window { } /// Creates a new webview window. + /// + /// Data URLs are only supported with the `window-data-url` feature flag. pub fn create_window( &mut self, label: String, diff --git a/tooling/api/src/window.ts b/tooling/api/src/window.ts index c5e15171e..e8bcd5107 100644 --- a/tooling/api/src/window.ts +++ b/tooling/api/src/window.ts @@ -1145,7 +1145,11 @@ const appWindow = new WebviewWindow( /** Configuration for the window to create. */ interface WindowOptions { /** - * Remote URL or local file path to open, e.g. `https://github.com/tauri-apps` or `path/to/page.html`. + * Remote URL or local file path to open. + * + * - URL such as `https://github.com/tauri-apps` is opened directly on a Tauri window. + * - data: URL such as `data:text/html,...` is only supported with the `window-data-url` Cargo feature for the `tauri` dependency. + * - local file path or route such as `/path/to/page.html` or `/users` is appended to the application URL (the devServer URL on development, or `tauri://localhost/` and `https://tauri.localhost/` on production). */ url?: string /** Show window in the center of the screen.. */