Load a new URL using BrowserWindow


#1

Hello,

When a new URL load is requested from a renderer, I used IPC async as below. It does what it is intended: show a new page.

I want to know whether this is the right way. If possible, I’d like to know discussions regarding opening a new page requested by a renderer.

    mainWindow = new BrowserWindow({width: 800, height: 600});
    ...
    ipc.on('show-url', function(event, url){
        mainWindow.loadUrl(appdir + '/' + url);
    });