I'm using this to open new windows in JS. Something similar worked in Tauri v1. Is this correct? I'm getting the error message that's it's an unstable API.
const w = await Window.getByLabel(ROUTE_SETTINGS);
if (w) return w.setFocus();
const window = new Window(ROUTE_SETTINGS, {
hiddenTitle: true,
width: 400,
height: 500,
focus: true,
maximizable: false,
resizable: false,
center: true,
titleBarStyle: "overlay",
});
const webview = new Webview(window, ROUTE_SETTINGS, {
url: ROUTE_SETTINGS,
x: 0,
y: 0,
height: 500,
width: 400,
// transparent: true,
});
webview.once("tauri://created", () => console.log("created"));
webview.once("tauri://error", (e) => console.log("error", e));