5
0
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:
Lea Anthony 2019-01-15 08:36:10 +11:00 committed by GitHub
commit 83e063bf2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -126,6 +126,13 @@ func (h *Headless) start(conn *websocket.Conn) {
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
if h.appConfig.CSS != "" {
outputCSS := fmt.Sprintf("%.45s", h.appConfig.CSS)