mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
Merge branch 'v3-alpha_linux' into v3-alpha
# Conflicts: # v3/STATUS.md # v3/examples/menu/main.go # v3/go.mod # v3/pkg/application/application.go # v3/pkg/application/webview_window.go
This commit is contained in:
@@ -4,19 +4,16 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func (m *MessageProcessor) callErrorCallback(window *WebviewWindow, message string, callID *string, err error) {
|
||||
errorMsg := fmt.Sprintf(message, err)
|
||||
m.Error(errorMsg)
|
||||
msg := "_wails.callErrorCallback('" + *callID + "', " + strconv.Quote(errorMsg) + ");"
|
||||
window.ExecJS(msg)
|
||||
window.CallError(callID, errorMsg)
|
||||
}
|
||||
|
||||
func (m *MessageProcessor) callCallback(window *WebviewWindow, callID *string, result string, isJSON bool) {
|
||||
msg := fmt.Sprintf("_wails.callCallback('%s', %s, %v);", *callID, strconv.Quote(result), isJSON)
|
||||
window.ExecJS(msg)
|
||||
window.CallResponse(callID, result)
|
||||
}
|
||||
|
||||
func (m *MessageProcessor) processCallMethod(method string, rw http.ResponseWriter, _ *http.Request, window *WebviewWindow, params QueryParams) {
|
||||
|
||||
Reference in New Issue
Block a user