Răsfoiți Sursa

chore(examples): use appWindow on multiwindow example

Lucas Nogueira 3 ani în urmă
părinte
comite
356b3e1c46
1 a modificat fișierele cu 3 adăugiri și 3 ștergeri
  1. 3 3
      examples/multiwindow/index.html

+ 3 - 3
examples/multiwindow/index.html

@@ -16,8 +16,8 @@
 
   <script>
     var WebviewWindow = window.__TAURI__.window.WebviewWindow
-    var thisTauriWindow = window.__TAURI__.window.getCurrent()
-    var windowLabel = thisTauriWindow.label
+    var appWindow = window.__TAURI__.window.appWindow
+    var windowLabel = appWindow.label
     var windowLabelContainer = document.getElementById('window-label')
     windowLabelContainer.innerText = 'This is the ' + windowLabel + ' window.'
 
@@ -44,7 +44,7 @@
 
     var responseContainer = document.getElementById('response')
     // listener tied to this window
-    thisTauriWindow.listen('clicked', function (event) {
+    appWindow.listen('clicked', function (event) {
       responseContainer.innerText +=
         'Got ' + JSON.stringify(event) + ' on window listener\n\n'
     })