Feature: AssetServer Runtime (#2335)

* Tidy up runtime JS

* Initial implementation of runtime over http

* Update runtime deps. Fix test task.

* Support Clipboard.
Message Processor refactor.

* Add `Window.Screen()`
Clipboard `GetText` -> `Text`

* Support most dialogs
Better JS->Go object mapping
Implement Go->JS callback mechanism
Rename `window.runtime` -> `window.wails` to better reflect the Go API

* Support SaveFile dialog

* Remove go.work

* Tidy up

* Event->CustomEvent to prevent potential clash with native JS Event object
Support Eventing

* Support application calls

* Support logging

* Support named windows
Remove debug info

* Update v3 changes
This commit is contained in:
Lea Anthony
2023-02-06 20:50:11 +11:00
committed by GitHub
parent 88e79f2598
commit 5dbda4aead
70 changed files with 10176 additions and 3634 deletions
@@ -0,0 +1,23 @@
package application
import (
"net/http"
)
func (m *MessageProcessor) processApplicationMethod(method string, rw http.ResponseWriter, r *http.Request, window *WebviewWindow, params QueryParams) {
switch method {
case "Quit":
globalApplication.Quit()
m.ok(rw)
case "Hide":
globalApplication.Hide()
m.ok(rw)
case "Show":
globalApplication.Show()
m.ok(rw)
default:
m.httpError(rw, "Unknown event method: %s", method)
}
}