Thursday, 27 April 2017

Electron. Load external website and access electron main process

Sorry for possible duplicate. Is it possible in electron to load external website and access main process from website?

My flow:

  • Open URL inside electron window:

    mainWindow.loadURL("http://localhost:80/");

  • Inside my index.html, which will be downloaded from http://localhost:80/ I want to execute something like that require('remote').remote

But when i actually try to do that, browsers console throws this error

Uncaught TypeError: fs.existsSync is not a function

How can i run scripts written for electron inside browser page, which was loaded from electron ?



via blckt

No comments:

Post a Comment