mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-03 06:51:26 +08:00
fix for rendering fragments via headless
This commit is contained in:
parent
60f34223b0
commit
6e0773b355
@ -125,6 +125,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