Skip to content

Commit

Permalink
Doc broken will-navigate listener
Browse files Browse the repository at this point in the history
  • Loading branch information
dbkr committed Jan 24, 2019
1 parent 0022834 commit 2aaed5d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions electron_app/src/webcontents-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,18 @@ function onEditableContextMenu(ev, params) {

module.exports = (webContents) => {
webContents.on('new-window', onWindowOrNavigate);
// XXX: The below now does absolutely nothing because of
// https://github.com/electron/electron/issues/8841
// Whilst this isn't a security issue since without
// node integration and with the sandbox, it should be
// no worse than opening the site in Chrome, it obviously
// means the user has to restart Riot to make it usable
// again (often unintuitive because it minimises to the
// system tray). We therefore need to be vigilant about
// putting target="_blank" on links in Riot (although
// we should generally be doing this anyway since links
// navigating you away from Riot in the browser is
// also annoying).
webContents.on('will-navigate', onWindowOrNavigate);

webContents.on('context-menu', function(ev, params) {
Expand Down

0 comments on commit 2aaed5d

Please sign in to comment.