どうやるんかなぁとか思ってたら、JavaScript側でいいみたい。
https://tauri.app/v1/guides/features/multiwindow/
import { WebviewWindow } from '@tauri-apps/api/window'
const webview = new WebviewWindow('theUniqueLabel', {
url: 'path/to/page.html',
})
// since the webview window is created asynchronously,
// Tauri emits the `tauri://created` and `tauri://error` to notify you of the creation response
webview.once('tauri://created', function () {
// webview window successfully created
})
webview.once('tauri://error', function (e) {
// an error occurred during webview window creation
})
ボタンを押したら別窓とかも普通に出来た。
重複起動もしないし、これで行こう。
You must log in or register to comment.