asticode / go-astilectron

Build cross platform GUI apps with GO and HTML/JS/CSS (powered by Electron)
MIT License
4.9k stars 344 forks source link

LoadUrl Option #253

Closed Oyal2 closed 4 years ago

Oyal2 commented 4 years ago

Im trying to load my electron window with a current url. Similar to this one

Electron supports it here win.loadURL('http://github.com') but I cant seem to find a solution for this feature. Whenever I try to WindowLoadOptions and I call document.URL I just the directory of my static html file. Any feature that can achieve the loadURL that electron has?

Oyal2 commented 4 years ago

Seems like i can use require('electron').remote.getCurrentWindow().webContents.loadURL('https://github.com') to load URLs in my js file

asticode commented 4 years ago

When you create a window, the first arg is the url of the window