TargetClientCreateTargetAsync Method |
Version 87.1.132
Creates a new page.
Namespace:
CefSharp.DevTools.Target
Assembly:
CefSharp (in CefSharp.dll) Version: 87.1.132.0 (87.1.132.0)
Syntax public Task<CreateTargetResponse> CreateTargetAsync(
string url,
Nullable<int> width = null,
Nullable<int> height = null,
string browserContextId = null,
Nullable<bool> enableBeginFrameControl = null,
Nullable<bool> newWindow = null,
Nullable<bool> background = null
)
public:
Task<CreateTargetResponse^>^ CreateTargetAsync(
String^ url,
Nullable<int> width = nullptr,
Nullable<int> height = nullptr,
String^ browserContextId = nullptr,
Nullable<bool> enableBeginFrameControl = nullptr,
Nullable<bool> newWindow = nullptr,
Nullable<bool> background = nullptr
)
Parameters
- url
- Type: SystemString
The initial URL the page will be navigated to. - width (Optional)
- Type: SystemNullableInt32
Frame width in DIP (headless chrome only). - height (Optional)
- Type: SystemNullableInt32
Frame height in DIP (headless chrome only). - browserContextId (Optional)
- Type: SystemString
The browser context to create the page in. - enableBeginFrameControl (Optional)
- Type: SystemNullableBoolean
Whether BeginFrames for this target will be controlled via DevTools (headless chrome only,not supported on MacOS yet, false by default). - newWindow (Optional)
- Type: SystemNullableBoolean
Whether to create a new Window or Tab (chrome-only, false by default). - background (Optional)
- Type: SystemNullableBoolean
Whether to create the target in background or foreground (chrome-only,false by default).
Return Value
Type:
TaskCreateTargetResponsereturns System.Threading.Tasks.Task<CreateTargetResponse>
See Also