Merge pull request #5737 from electron/browser-window-proxy-print
Add print() to BrowserWindowProxy
This commit is contained in:
commit
1e99f656cc
2 changed files with 8 additions and 0 deletions
|
@ -63,6 +63,10 @@ Evaluates the code in the child window.
|
||||||
|
|
||||||
Focuses the child window (brings the window to front).
|
Focuses the child window (brings the window to front).
|
||||||
|
|
||||||
|
### `BrowserWindowProxy.print()`
|
||||||
|
|
||||||
|
Invokes the print dialog on the child window.
|
||||||
|
|
||||||
### `BrowserWindowProxy.postMessage(message, targetOrigin)`
|
### `BrowserWindowProxy.postMessage(message, targetOrigin)`
|
||||||
|
|
||||||
* `message` String
|
* `message` String
|
||||||
|
|
|
@ -45,6 +45,10 @@ var BrowserWindowProxy = (function () {
|
||||||
return ipcRenderer.send('ELECTRON_GUEST_WINDOW_MANAGER_WINDOW_METHOD', this.guestId, 'blur')
|
return ipcRenderer.send('ELECTRON_GUEST_WINDOW_MANAGER_WINDOW_METHOD', this.guestId, 'blur')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BrowserWindowProxy.prototype.print = function () {
|
||||||
|
return ipcRenderer.send('ELECTRON_GUEST_WINDOW_MANAGER_WEB_CONTENTS_METHOD', this.guestId, 'print')
|
||||||
|
}
|
||||||
|
|
||||||
Object.defineProperty(BrowserWindowProxy.prototype, 'location', {
|
Object.defineProperty(BrowserWindowProxy.prototype, 'location', {
|
||||||
get: function () {
|
get: function () {
|
||||||
return ipcRenderer.sendSync('ELECTRON_GUEST_WINDOW_MANAGER_WINDOW_METHOD', this.guestId, 'getURL')
|
return ipcRenderer.sendSync('ELECTRON_GUEST_WINDOW_MANAGER_WINDOW_METHOD', this.guestId, 'getURL')
|
||||||
|
|
Loading…
Reference in a new issue