sciter-sdk / go-sciter

Golang bindings of Sciter: the Embeddable HTML/CSS/script engine for modern UI development
https://sciter.com
2.57k stars 268 forks source link

How does the "HTML" of go-sciter start to call js resources #326

Closed zw9629 closed 2 years ago

zw9629 commented 2 years ago

In my "go-sciter" project, html can load the js file correctly in both the browser and "scapp.exe" (windows), but in the "go run" or "go build", the js file cannot be loaded in the window image image

image "Scapp.exe" on the left, "go run myapp" on the right Can you help me

pravic commented 2 years ago

window.LoadFile must be provided with an absolute path. See https://github.com/sciter-sdk/go-sciter/blob/a04e052a28133d8a79c82b53fc861d1e473c0499/examples/demoes/01/demo1.go#L30-L34

zw9629 commented 2 years ago

window.LoadFile必须提供一个绝对路径。 看到

https://github.com/sciter-sdk/go-sciter/blob/a04e052a28133d8a79c82b53fc861d1e473c0499/examples/demoes/01/demo1.go#L30-L34

Thank you very much. The problem has been solved.