mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 10:21:20 +08:00
fix for ipc binding
made reconnect modal a bit better
This commit is contained in:
parent
3f2f1b45f6
commit
0ae5381203
@ -20,7 +20,7 @@
|
||||
text-align: center;
|
||||
width: 20em;
|
||||
position: relative;
|
||||
height: 17em;
|
||||
height: 14em;
|
||||
border-radius: 1em;
|
||||
margin: 5% auto 0;
|
||||
background-color: white;
|
||||
|
@ -39,6 +39,7 @@ func (h *Headless) Initialise(appConfig *AppConfig, ipcManager *ipcManager, even
|
||||
h.ipcManager = ipcManager
|
||||
h.appConfig = appConfig
|
||||
h.eventManager = eventManager
|
||||
ipcManager.bindRenderer(h)
|
||||
h.log = newCustomLogger("Headless")
|
||||
return nil
|
||||
}
|
||||
@ -99,17 +100,13 @@ func (h *Headless) start(conn *websocket.Conn) {
|
||||
// set external.invoke
|
||||
h.log.Infof("Connected to frontend.")
|
||||
|
||||
// If we are given an HTML fragment, load jquery
|
||||
// for the html() function
|
||||
if h.appConfig.isHTMLFragment {
|
||||
// Inject jquery
|
||||
jquery := BoxString(&defaultAssets, "jquery.3.3.1.min.js")
|
||||
h.evalJS(jquery)
|
||||
}
|
||||
|
||||
wailsRuntime := BoxString(&defaultAssets, "wails.js")
|
||||
h.evalJS(wailsRuntime)
|
||||
|
||||
// Inject jquery
|
||||
jquery := BoxString(&defaultAssets, "jquery.3.3.1.min.js")
|
||||
h.evalJS(jquery)
|
||||
|
||||
// Inject the initial JS
|
||||
for _, js := range h.initialisationJS {
|
||||
h.sendMessage(conn, js)
|
||||
|
Loading…
Reference in New Issue
Block a user