TargetClient Class |
Namespace: CefSharp.DevTools.Target
The TargetClient type exposes the following members.
Name | Description | |
---|---|---|
TargetClient |
Target
|
Name | Description | |
---|---|---|
ActivateTargetAsync |
Activates (focuses) the target.
| |
AttachToBrowserTargetAsync |
Attaches to the browser target, only uses flat sessionId mode.
| |
AttachToTargetAsync |
Attaches to the target with given id.
| |
AutoAttachRelatedAsync |
Adds the specified target to the list of targets that will be monitored for any related target
creation (such as child frames, child workers and new versions of service worker) and reported
through `attachedToTarget`. The specified target is also auto-attached.
This cancels the effect of any previous `setAutoAttach` and is also cancelled by subsequent
`setAutoAttach`. Only available at the Browser target.
| |
CloseTargetAsync |
Closes the target. If the target is a page that gets closed too.
| |
CreateBrowserContextAsync |
Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than
one.
| |
CreateTargetAsync |
Creates a new page.
| |
DetachFromTargetAsync |
Detaches session with given id.
| |
DisposeBrowserContextAsync |
Deletes a BrowserContext. All the belonging pages will be closed without calling their
beforeunload hooks.
| |
EnumToString(ContentEncoding) | (Inherited from DevToolsDomainBase.) | |
EnumToString(CSPViolationType) | (Inherited from DevToolsDomainBase.) | |
EnumToString(DisabledImageType) | (Inherited from DevToolsDomainBase.) | |
EnumToString(Enum) | (Inherited from DevToolsDomainBase.) | |
EnumToString(PermissionType) | (Inherited from DevToolsDomainBase.) | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
ExposeDevToolsProtocolAsync |
Inject object to the target's main frame that provides a communication
channel with browser target.
Injected object will be available as `window[bindingName]`.
The object has the follwing API:
- `binding.send(json)` - a method to send messages over the remote debugging protocol
- `binding.onmessage = json => handleMessage(json)` - a callback that will be called for the protocol notifications and command responses.
| |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetBrowserContextsAsync |
Returns all browser contexts created with `Target.createBrowserContext` method.
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetTargetInfoAsync |
Returns information about a target.
| |
GetTargetsAsync |
Retrieves a list of available targets.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
SetAutoAttachAsync |
Controls whether to automatically attach to new targets which are considered to be related to
this one. When turned on, attaches to all existing related targets as well. When turned off,
automatically detaches from all currently attached targets.
This also clears all targets added by `autoAttachRelated` from the list of targets to watch
for creation of related targets.
| |
SetDiscoverTargetsAsync |
Controls whether to discover available targets and notify via
`targetCreated/targetInfoChanged/targetDestroyed` events.
| |
SetRemoteLocationsAsync |
Enables target discovery for the specified locations, when `setDiscoverTargets` was set to
`true`.
| |
ToBase64String | (Inherited from DevToolsDomainBase.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
AttachedToTarget |
Issued when attached to target because of auto-attach or `attachToTarget` command.
| |
DetachedFromTarget |
Issued when detached from target for any reason (including `detachFromTarget` command). Can be
issued multiple times per target if multiple sessions have been attached to it.
| |
ReceivedMessageFromTarget |
Notifies about a new protocol message received from the session (as reported in
`attachedToTarget` event).
| |
TargetCrashed |
Issued when a target has crashed.
| |
TargetCreated |
Issued when a possible inspection target is created.
| |
TargetDestroyed |
Issued when a target is destroyed.
| |
TargetInfoChanged |
Issued when some information about a target has changed. This only happens between
`targetCreated` and `targetDestroyed`.
|