:fax: Add print() to BrowserWindowProxy
authorFelix Rieseberg <felix@felixrieseberg.com>
Thu, 26 May 2016 16:35:26 +0000 (09:35 -0700)
committerKevin Sawicki <kevinsawicki@gmail.com>
Fri, 27 May 2016 18:11:19 +0000 (11:11 -0700)
Closes #5685

docs/api/window-open.md
lib/renderer/override.js

index 7f9400b..b615a4b 100644 (file)
@@ -63,6 +63,10 @@ Evaluates the code in the child window.
 
 Focuses the child window (brings the window to front).
 
+### `BrowserWindowProxy.print()`
+
+Invokes the print dialog on the child window.
+
 ### `BrowserWindowProxy.postMessage(message, targetOrigin)`
 
 * `message` String
index 35ca80f..4f0b861 100644 (file)
@@ -45,6 +45,10 @@ var BrowserWindowProxy = (function () {
     return ipcRenderer.send('ELECTRON_GUEST_WINDOW_MANAGER_WINDOW_METHOD', this.guestId, 'blur')
   }
 
+  BrowserWindowProxy.prototype.print = function () {
+    return ipcRenderer.send('ELECTRON_GUEST_WINDOW_MANAGER_WINDOW_METHOD', this.guestId, 'print')
+  }
+
   Object.defineProperty(BrowserWindowProxy.prototype, 'location', {
     get: function () {
       return ipcRenderer.sendSync('ELECTRON_GUEST_WINDOW_MANAGER_WINDOW_METHOD', this.guestId, 'getURL')