mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 23:10:29 +00:00
Merge pull request #8494 from rhysd/getCurrentWebContents
github-electron: add missing remote.getCurrentWebContents()
This commit is contained in:
@@ -38,6 +38,8 @@ remote.getCurrentWindow().capturePage(buf => {
|
||||
});
|
||||
});
|
||||
|
||||
remote.getCurrentWebContents().print();
|
||||
|
||||
remote.getCurrentWindow().capturePage(buf => {
|
||||
remote.require('fs').writeFile('/tmp/screenshot.png', buf, (err: Error) => {
|
||||
console.log(err);
|
||||
|
||||
Vendored
+4
@@ -1541,6 +1541,10 @@ declare module Electron {
|
||||
* @returns The BrowserWindow object which this web page belongs to.
|
||||
*/
|
||||
getCurrentWindow(): BrowserWindow;
|
||||
/**
|
||||
* @returns The WebContents object of this web page.
|
||||
*/
|
||||
getCurrentWebContents(): WebContents;
|
||||
/**
|
||||
* @returns The global variable of name (e.g. global[name]) in the main process.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user