docs: win.getParentWindow() returns BrowserWindow | null (#31575)

Co-authored-by: Milan Burda <milan.burda@gmail.com>
This commit is contained in:
trop[bot]
2021-10-26 17:38:33 +09:00
committed by GitHub
parent 58dd15f165
commit 7746f1d13e
2 changed files with 2 additions and 2 deletions

View File

@@ -1685,7 +1685,7 @@ current window into a top-level window.
#### `win.getParentWindow()`
Returns `BrowserWindow` - The parent window.
Returns `BrowserWindow | null` - The parent window or `null` if there is no parent.
#### `win.getChildWindows()`

View File

@@ -3498,7 +3498,7 @@ describe('BrowserWindow module', () => {
const w = new BrowserWindow({ show: false });
const c = new BrowserWindow({ show: false, parent: w });
expect(c.isVisible()).to.be.false('child is visible');
expect(c.getParentWindow().isVisible()).to.be.false('parent is visible');
expect(c.getParentWindow()!.isVisible()).to.be.false('parent is visible');
});
});