diff --git a/v3/internal/runtime/desktop/@wailsio/runtime/package.json b/v3/internal/runtime/desktop/@wailsio/runtime/package.json index 18f0e60e7..468aa4fd2 100644 --- a/v3/internal/runtime/desktop/@wailsio/runtime/package.json +++ b/v3/internal/runtime/desktop/@wailsio/runtime/package.json @@ -1,6 +1,6 @@ { "name": "@wailsio/runtime", - "version": "3.0.0-alpha.8", + "version": "3.0.0-alpha.9", "description": "Wails Runtime", "main": "src/index.js", "types": "types/index.d.ts", diff --git a/v3/internal/runtime/desktop/@wailsio/runtime/src/calls.js b/v3/internal/runtime/desktop/@wailsio/runtime/src/calls.js index a4add6bc4..7e2ec0386 100644 --- a/v3/internal/runtime/desktop/@wailsio/runtime/src/calls.js +++ b/v3/internal/runtime/desktop/@wailsio/runtime/src/calls.js @@ -17,8 +17,8 @@ const call = newRuntimeCallerWithID(objectNames.Call, ''); let callResponses = new Map(); window._wails = window._wails || {}; -window._wails.callCallback = resultHandler; -window._wails.callErrorCallback = errorHandler; +window._wails.callResultHandler = resultHandler; +window._wails.callErrorHandler = errorHandler; function generateID() { let result; diff --git a/v3/internal/runtime/desktop/@wailsio/runtime/src/dialogs.js b/v3/internal/runtime/desktop/@wailsio/runtime/src/dialogs.js index 6158484ed..5db468744 100644 --- a/v3/internal/runtime/desktop/@wailsio/runtime/src/dialogs.js +++ b/v3/internal/runtime/desktop/@wailsio/runtime/src/dialogs.js @@ -70,7 +70,7 @@ function dialog(type, options = {}) { * * @return {undefined} */ -export function dialogCallback(id, data, isJSON) { +export function dialogResultCallback(id, data, isJSON) { let p = dialogResponses.get(id); if (p) { if (isJSON) { diff --git a/v3/internal/runtime/desktop/@wailsio/runtime/types/dialogs.d.ts b/v3/internal/runtime/desktop/@wailsio/runtime/types/dialogs.d.ts index 050c4f698..d6a0bf1db 100644 --- a/v3/internal/runtime/desktop/@wailsio/runtime/types/dialogs.d.ts +++ b/v3/internal/runtime/desktop/@wailsio/runtime/types/dialogs.d.ts @@ -7,7 +7,7 @@ * * @return {undefined} */ -export function dialogCallback(id: string, data: string, isJSON: boolean): undefined; +export function dialogResultCallback(id: string, data: string, isJSON: boolean): undefined; /** * Callback function for handling errors in dialog. * diff --git a/v3/internal/runtime/desktop/main.js b/v3/internal/runtime/desktop/main.js index 3546a8153..8503f0627 100644 --- a/v3/internal/runtime/desktop/main.js +++ b/v3/internal/runtime/desktop/main.js @@ -19,7 +19,7 @@ import * as Window from './@wailsio/runtime/window'; import {Plugin, Call, errorHandler as callErrorHandler, resultHandler as callResultHandler, ByID, ByName} from "./@wailsio/runtime/calls"; import {clientId} from './@wailsio/runtime/runtime'; import {dispatchWailsEvent, Emit, Off, OffAll, On, Once, OnMultiple} from "./@wailsio/runtime/events"; -import {dialogCallback, dialogErrorCallback, Error, Info, OpenFile, Question, SaveFile, Warning} from "./@wailsio/runtime/dialogs"; +import {dialogResultCallback, dialogErrorCallback, Error, Info, OpenFile, Question, SaveFile, Warning} from "./@wailsio/runtime/dialogs"; import {setupContextMenus} from './@wailsio/runtime/contextmenu'; import {reloadWML} from './@wailsio/runtime/wml'; import {setupDrag, endDrag, setResizable} from './@wailsio/runtime/drag'; @@ -31,7 +31,7 @@ window.wails = { // Internal wails endpoints window._wails = { - dialogCallback, + dialogResultCallback, dialogErrorCallback, dispatchWailsEvent, callErrorHandler, diff --git a/v3/pkg/application/webview_window.go b/v3/pkg/application/webview_window.go index 8a2786db4..a17a40676 100644 --- a/v3/pkg/application/webview_window.go +++ b/v3/pkg/application/webview_window.go @@ -258,9 +258,9 @@ func (w *WebviewWindow) DialogError(dialogID string, result string) { func (w *WebviewWindow) DialogResponse(dialogID string, result string, isJSON bool) { if w.impl != nil { if isJSON { - w.impl.execJS(w.formatJS("_wails.dialogCallback('%s', %s, true);", dialogID, result)) + w.impl.execJS(w.formatJS("_wails.dialogResultCallback('%s', %s, true);", dialogID, result)) } else { - w.impl.execJS(fmt.Sprintf("_wails.dialogCallback('%s', '%s', false);", dialogID, result)) + w.impl.execJS(fmt.Sprintf("_wails.dialogResultCallback('%s', '%s', false);", dialogID, result)) } } } diff --git a/v3/plugins/experimental/server/window.go b/v3/plugins/experimental/server/window.go index 6506ec959..7348d456f 100644 --- a/v3/plugins/experimental/server/window.go +++ b/v3/plugins/experimental/server/window.go @@ -50,9 +50,9 @@ func (w Window) DialogError(dialogID string, result string) { } func (w Window) DialogResponse(dialogID string, result string, isJSON bool) { - cmd := "_wails.dialogCallback('%s', %s, true);" + cmd := "_wails.dialogResultCallback('%s', %s, true);" if !isJSON { - cmd = "_wails.dialogCallback('%s', %s, false);" + cmd = "_wails.dialogResultCallback('%s', %s, false);" } w.ExecJS(dialogID, w.formatJS(cmd, dialogID, result)) }