mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-13 05:34:47 +00:00
browserWindowSetParentWindow: Support null parameter
This commit is contained in:
@@ -1140,7 +1140,17 @@ public class BrowserWindow : ApiBase
|
||||
/// passing null will turn current window into a top-level window.
|
||||
/// </summary>
|
||||
/// <param name="parent"></param>
|
||||
public void SetParentWindow(BrowserWindow parent) => this.CallMethod1(JObject.FromObject(parent, _jsonSerializer));
|
||||
public void SetParentWindow(BrowserWindow parent)
|
||||
{
|
||||
if (parent == null)
|
||||
{
|
||||
BridgeConnector.Socket.Emit("browserWindowSetParentWindow", Id, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
BridgeConnector.Socket.Emit("browserWindowSetParentWindow", Id, JObject.FromObject(parent, _jsonSerializer));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The parent window.
|
||||
|
||||
Reference in New Issue
Block a user