mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 20:03:01 +08:00
Merge pull request #23 from wailsapp/Update-execution-order-in-Headless-mode
Update execution order in headless mode
This commit is contained in:
commit
83e063bf2b
@ -215,7 +215,7 @@ func init() {
|
|||||||
|
|
||||||
// If we are forcing a rebuild
|
// If we are forcing a rebuild
|
||||||
if forceRebuild {
|
if forceRebuild {
|
||||||
buildCommand.Add(" -a")
|
buildCommand.Add("-a")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Release mode
|
// Release mode
|
||||||
|
@ -126,6 +126,13 @@ func (h *Headless) start(conn *websocket.Conn) {
|
|||||||
h.injectCSS(h.frameworkCSS)
|
h.injectCSS(h.frameworkCSS)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var injectHTML string
|
||||||
|
if h.appConfig.isHTMLFragment {
|
||||||
|
injectHTML = fmt.Sprintf("$('#app').html('%s')", h.appConfig.HTML)
|
||||||
|
}
|
||||||
|
|
||||||
|
h.evalJS(injectHTML)
|
||||||
|
|
||||||
// Inject user CSS
|
// Inject user CSS
|
||||||
if h.appConfig.CSS != "" {
|
if h.appConfig.CSS != "" {
|
||||||
outputCSS := fmt.Sprintf("%.45s", h.appConfig.CSS)
|
outputCSS := fmt.Sprintf("%.45s", h.appConfig.CSS)
|
||||||
|
Loading…
Reference in New Issue
Block a user