mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
docs: win.getParentWindow() returns BrowserWindow | null (#31548)
This commit is contained in:
@@ -1697,7 +1697,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()`
|
||||
|
||||
|
||||
@@ -3485,7 +3485,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');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user