Add BrowserView tab system and overlay menu for desktop mode
Introduces a BrowserView-based tab management system for desktop mode, replacing webview elements for tab content. Adds IPC handlers and state management for creating, activating, destroying, and communicating with BrowserViews. Implements an overlay menu popup window for tab actions and zoom controls. Updates renderer UI to use a dedicated view host container, and refactors tab creation and navigation logic to use BrowserViews. Improves focus styling in CSS and updates preload and IPC messaging to support BrowserView contexts.
This commit is contained in:
@@ -1912,10 +1912,15 @@ function navigateTo(url) {
|
||||
webview.style.width = '100%';
|
||||
webview.style.height = '100%';
|
||||
webview.style.border = 'none';
|
||||
webview.preload = '../preload.js';
|
||||
const preloadPath = window.electronAPI?.getWebviewPreloadPath?.();
|
||||
if (preloadPath) {
|
||||
webview.setAttribute('preload', preloadPath);
|
||||
} else {
|
||||
webview.setAttribute('preload', '../preload.js');
|
||||
}
|
||||
webview.partition = 'persist:main';
|
||||
webview.allowpopups = true;
|
||||
webview.webpreferences = 'allowRunningInsecureContent=false,javascript=true,webSecurity=true';
|
||||
webview.setAttribute('webpreferences', 'allowRunningInsecureContent=false,javascript=true,webSecurity=true');
|
||||
|
||||
container.appendChild(webview);
|
||||
state.currentWebview = webview;
|
||||
|
||||
Reference in New Issue
Block a user