diff --git a/examples/transparent.mjs b/examples/transparent.mjs
new file mode 100644
index 0000000..cb6cce4
--- /dev/null
+++ b/examples/transparent.mjs
@@ -0,0 +1,20 @@
+import { Application } from "../index.js";
+
+const app = new Application();
+const window = app.createBrowserWindow({
+ transparent: true,
+ decorations: false,
+});
+
+const webview = window.createWebview({
+ html: /* html */ `
+
+
+ Hello, transparent!
+
+ `,
+ transparent: true,
+ enableDevtools: true,
+});
+
+app.run();
diff --git a/src/browser_window.rs b/src/browser_window.rs
index 4c59077..8683945 100644
--- a/src/browser_window.rs
+++ b/src/browser_window.rs
@@ -209,6 +209,15 @@ impl BrowserWindow {
window = window.with_focused(focused);
}
+ if let Some(transparent) = options.transparent {
+ window = window.with_transparent(transparent);
+ #[cfg(target_os = "windows")]
+ {
+ use tao::platform::windows::WindowBuilderExtWindows;
+ window = window.with_undecorated_shadow(false);
+ }
+ }
+
if let Some(fullscreen) = options.fullscreen {
let fs = match fullscreen {
// Some(FullscreenType::Exclusive) => Some(Fullscreen::Exclusive()),