Skip to content
Discussion options

You must be logged in to vote

@iamxiaojianzheng No, Tauri does not support "reparenting" a live WebView from one window to another (like moving WebContents in Electron).
In Tauri, a WebView is tightly coupled to its Window (or Window reference in v2).

To achieve a similar UX (moving content between windows):

  1. State Hydration: Keep your app state in Rust (or a shared backend store). When you open the new window, initialize it with that state.
  2. Events: Use emit to synchronize data between the windows.

The underlying OS webview controls (WebView2 on Windows, WebKit on macOS) generally don''t support being detached and reattached to different parent HWNDs/NSWindows easily across the abstraction layer Tauri provides.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by iamxiaojianzheng
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants