|
@@ -1,3 +1,5 @@
|
|
|
+const WebviewWindow = window.__TAURI__.window.WebviewWindow
|
|
|
+
|
|
|
const routeSelect = document.querySelector('#route')
|
|
|
const link = document.querySelector('#link')
|
|
|
|
|
@@ -8,3 +10,9 @@ routeSelect.addEventListener('change', (event) => {
|
|
|
document.querySelector('#go').addEventListener('click', () => {
|
|
|
window.location.href = (window.location.origin + '/' + routeSelect.value)
|
|
|
})
|
|
|
+
|
|
|
+document.querySelector('#open-window').addEventListener('click', () => {
|
|
|
+ new WebviewWindow(Math.random().toString(), {
|
|
|
+ url: routeSelect.value
|
|
|
+ })
|
|
|
+})
|