Click or drag to resize

TargetClient.CreateTargetAsync Method

Version 130.1.90
Creates a new page.

Namespace: CefSharp.DevTools.Target
Assembly: CefSharp.Core (in CefSharp.Core.dll) Version: 129.0.110.0
Syntax
public Task<CreateTargetResponse> CreateTargetAsync(
	string url,
	int? width = null,
	int? height = null,
	string browserContextId = null,
	bool? enableBeginFrameControl = null,
	bool? newWindow = null,
	bool? background = null,
	bool? forTab = null
)

Parameters

url  String
The initial URL the page will be navigated to. An empty string indicates about:blank.
width  Nullable<Int32>  (Optional)
Frame width in DIP (headless chrome only).
height  Nullable<Int32>  (Optional)
Frame height in DIP (headless chrome only).
browserContextId  String  (Optional)
The browser context to create the page in.
enableBeginFrameControl  Nullable<Boolean>  (Optional)
Whether BeginFrames for this target will be controlled via DevTools (headless chrome only,not supported on MacOS yet, false by default).
newWindow  Nullable<Boolean>  (Optional)
Whether to create a new Window or Tab (chrome-only, false by default).
background  Nullable<Boolean>  (Optional)
Whether to create the target in background or foreground (chrome-only,false by default).
forTab  Nullable<Boolean>  (Optional)
Whether to create the target of type "tab".

Return Value

Task<CreateTargetResponse>
returns System.Threading.Tasks.Task<CreateTargetResponse>
See Also