Skip to content

Commit

Permalink
Relative url support for ElectronContainer.createWindow
Browse files Browse the repository at this point in the history
electron.ts:
- Ensure all url passed to new BrowserWindow are converted to absolute

Fixes #140
  • Loading branch information
bingenito committed Apr 2, 2018
1 parent 2cd8b98 commit af5eae0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Electron/electron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ export class ElectronContainer extends WebContainerBase {
this.windowManager.initializeWindow(electronWindow, windowName, newOptions);
}

electronWindow.loadURL(url);
electronWindow.loadURL(this.ensureAbsoluteUrl(url));

const newWindow = this.wrapWindow(electronWindow);
this.emit("window-created", { sender: this, name: "window-created", window: newWindow, windowId: electronWindow.id, windowName: windowName });
Expand Down

0 comments on commit af5eae0

Please sign in to comment.