Merge pull request #6355 from electron/webview-capture-page

Add <webview>.capturePage([rect,] callback)
This commit is contained in:
Cheng Zhao 2016-07-07 10:09:40 +09:00 committed by GitHub
commit bbfdaf7679
11 changed files with 78 additions and 92 deletions

View file

@ -153,6 +153,9 @@ Object.assign(BrowserWindow.prototype, {
},
showDefinitionForSelection () {
return this.webContents.showDefinitionForSelection()
},
capturePage (...args) {
return this.webContents.capturePage.apply(this.webContents, args)
}
})

View file

@ -386,7 +386,8 @@ var registerWebViewElement = function () {
'inspectServiceWorker',
'print',
'printToPDF',
'showDefinitionForSelection'
'showDefinitionForSelection',
'capturePage'
]
nonblockMethods = [
'insertCSS',