|
@@ -225,11 +225,11 @@ const localTauriEvents = ['tauri://created', 'tauri://error']
|
|
*/
|
|
*/
|
|
class WebviewWindowHandle {
|
|
class WebviewWindowHandle {
|
|
/** Window label. */
|
|
/** Window label. */
|
|
- label: string
|
|
|
|
|
|
+ label: string | null
|
|
/** Local event listeners. */
|
|
/** Local event listeners. */
|
|
listeners: { [key: string]: Array<EventCallback<any>> }
|
|
listeners: { [key: string]: Array<EventCallback<any>> }
|
|
|
|
|
|
- constructor(label: string) {
|
|
|
|
|
|
+ constructor(label: string | null) {
|
|
this.label = label
|
|
this.label = label
|
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
this.listeners = Object.create(null)
|
|
this.listeners = Object.create(null)
|
|
@@ -1071,7 +1071,7 @@ class WindowManager extends WebviewWindowHandle {
|
|
* ```
|
|
* ```
|
|
*/
|
|
*/
|
|
class WebviewWindow extends WindowManager {
|
|
class WebviewWindow extends WindowManager {
|
|
- constructor(label: string, options: WindowOptions = {}) {
|
|
|
|
|
|
+ constructor(label: string | null, options: WindowOptions = {}) {
|
|
super(label)
|
|
super(label)
|
|
// @ts-expect-error
|
|
// @ts-expect-error
|
|
if (!options?.skip) {
|
|
if (!options?.skip) {
|
|
@@ -1108,7 +1108,7 @@ class WebviewWindow extends WindowManager {
|
|
}
|
|
}
|
|
|
|
|
|
/** The WebviewWindow for the current window. */
|
|
/** The WebviewWindow for the current window. */
|
|
-const appWindow = new WebviewWindow(window.__TAURI__.__currentWindow.label, {
|
|
|
|
|
|
+const appWindow = new WebviewWindow(null, {
|
|
// @ts-expect-error
|
|
// @ts-expect-error
|
|
skip: true
|
|
skip: true
|
|
})
|
|
})
|