Remove redundant IPC endpoint.

Don't auto-inject runtime.
This commit is contained in:
Lea Anthony
2023-12-29 12:42:03 +11:00
parent 4a910a7197
commit 7f8c1c8a68
-18
View File
@@ -18,7 +18,6 @@ import (
const ( const (
runtimeJSPath = "/wails/runtime.js" runtimeJSPath = "/wails/runtime.js"
ipcJSPath = "/wails/ipc.js"
runtimePath = "/wails/runtime" runtimePath = "/wails/runtime"
capabilitiesPath = "/wails/capabilities" capabilitiesPath = "/wails/capabilities"
flagsPath = "/wails/flags" flagsPath = "/wails/flags"
@@ -229,13 +228,6 @@ func (d *AssetServer) serveHTTP(rw http.ResponseWriter, req *http.Request) {
d.runtimeHandler.HandleRuntimeCall(rw, req) d.runtimeHandler.HandleRuntimeCall(rw, req)
return return
case ipcJSPath:
content := d.runtime.DesktopIPC()
if d.ipcJS != nil {
content = d.ipcJS(req)
}
d.writeBlob(rw, path, content)
default: default:
// Check if this is a plugin script // Check if this is a plugin script
if script, ok := d.pluginScripts[path]; ok { if script, ok := d.pluginScripts[path]; ok {
@@ -260,16 +252,6 @@ func (d *AssetServer) processIndexHTML(indexHTML []byte) ([]byte, error) {
} }
} }
if err := insertScriptInHead(htmlNode, runtimeJSPath); err != nil {
return nil, err
}
if d.debug {
if err := insertScriptInHead(htmlNode, ipcJSPath); err != nil {
return nil, err
}
}
// Inject plugins // Inject plugins
for scriptName := range d.pluginScripts { for scriptName := range d.pluginScripts {
if err := insertScriptInHead(htmlNode, scriptName); err != nil { if err := insertScriptInHead(htmlNode, scriptName); err != nil {