#(Solved) WebContents not working outside of Main Window

21 messages · Page 1 of 1 (latest)

polar mesa
thorny stag
#

Well yeah

#

that's how scope works

#

MainWindow is only defined in Launch

polar mesa
#

Then it appears I'm stuck, I need to pass $(url) to the main window

thorny stag
#

it's easy to fix

#

just use a let that you declare outside of the function

#

oh but you already have it ah ah

#

remove the const before MainWindow in Launch

#

you should configure your ESLint to prevent such mistake

polar mesa
thorny stag
#

then maybe open-url is run before your window is created

polar mesa
#

Yes, this does appear to be the case.
setTimeout usually solves a lot of issues for me.

thorny stag
#

why don't you do it on the renderer?

polar mesa
polar mesa
thorny stag
#

hmm it's a bad habit

#

I only have one in my whole app and it's because of a bug with a library ¯_(ツ)_/¯

polar mesa
#

(Solved) WebContents not working outside of Main Window