From: Cheng Zhao Date: Mon, 27 Oct 2014 15:23:26 +0000 (+0800) Subject: doc: "new-window" event of WebContents X-Git-Tag: v0.19.0~1^2~5 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=f44be283098a0d2f54f60055fa927f1a715fcdb8;p=electron.git doc: "new-window" event of WebContents --- diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index dd0bd4bd..d64292fb 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -546,6 +546,21 @@ Corresponds to the points in time when the spinner of the tab stops spinning. Emitted when a redirect was received while requesting a resource. +### Event: 'new-window' + +* `event` Event +* `url` String +* `frameName` String +* `options` Object + +Emitted when the page requested to open a new window for `url`. It could be +requested by `window.open` or a external link like ``. + +By default a new `BrowserWindow` will be created for `url` called, and a proxy +will be returned to `window.open` to let you have limited control of it. + +Calling `event.preventDefault()` can prevent creating new windows. + ### Event: 'crashed' Emitted when the renderer process is crashed.