Closed cove closed 4 years ago
I think you probably need an absolute path. In general, I would actually recommend to use a Path
from the FilePaths.jl package in this situation:
using Electron, FilePaths
app = Application()
win = Window(app, join(@__PATH__, "main.html"))
I didn't try it, but I think that should work.
that worked, thanks!
I think the solution is easier (but does the same): just add a third /
in file://...
using Electron, URIParser
app = Application()
cd(@__DIR__)
win = Window(app, URI("file:///main.html"))
I think that is more a bug that this works... My understanding is that file:
URIs need to be absolute.
I tried the following but is there some setting I need to pass in to allow loading local files?
I get the following error in the console:
Not allowed to load local resource: file://main.html/