Click or drag to resize

TargetClient Class

Version 94.4.20
Supports additional targets discovery and allows to attach to them.
Inheritance Hierarchy

Namespace:  CefSharp.DevTools.Target
Assembly:  CefSharp (in CefSharp.dll) Version: 94.4.20.0 (94.4.20.0)
Syntax
public class TargetClient : DevToolsDomainBase

The TargetClient type exposes the following members.

Constructors
  NameDescription
Public methodTargetClient
Target
Top
Methods
  NameDescription
Public methodActivateTargetAsync
Activates (focuses) the target.
Public methodAttachToBrowserTargetAsync
Attaches to the browser target, only uses flat sessionId mode.
Public methodAttachToTargetAsync
Attaches to the target with given id.
Public methodCloseTargetAsync
Closes the target. If the target is a page that gets closed too.
Public methodCreateBrowserContextAsync
Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than one.
Public methodCreateTargetAsync
Creates a new page.
Public methodDetachFromTargetAsync
Detaches session with given id.
Public methodDisposeBrowserContextAsync
Deletes a BrowserContext. All the belonging pages will be closed without calling their beforeunload hooks.
Protected methodEnumToString(Enum) (Inherited from DevToolsDomainBase.)
Protected methodEnumToString(ContentEncoding) (Inherited from DevToolsDomainBase.)
Protected methodEnumToString(CSPViolationType) (Inherited from DevToolsDomainBase.)
Protected methodEnumToString(DisabledImageType) (Inherited from DevToolsDomainBase.)
Protected methodEnumToString(PermissionType) (Inherited from DevToolsDomainBase.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodExposeDevToolsProtocolAsync
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.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetBrowserContextsAsync
Returns all browser contexts created with `Target.createBrowserContext` method.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetTargetInfoAsync
Returns information about a target.
Public methodGetTargetsAsync
Retrieves a list of available targets.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSetAutoAttachAsync
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.
Public methodSetDiscoverTargetsAsync
Controls whether to discover available targets and notify via `targetCreated/targetInfoChanged/targetDestroyed` events.
Public methodSetRemoteLocationsAsync
Enables target discovery for the specified locations, when `setDiscoverTargets` was set to `true`.
Protected methodToBase64String (Inherited from DevToolsDomainBase.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Events
  NameDescription
Public eventAttachedToTarget
Issued when attached to target because of auto-attach or `attachToTarget` command.
Public eventDetachedFromTarget
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.
Public eventReceivedMessageFromTarget
Notifies about a new protocol message received from the session (as reported in `attachedToTarget` event).
Public eventTargetCrashed
Issued when a target has crashed.
Public eventTargetCreated
Issued when a possible inspection target is created.
Public eventTargetDestroyed
Issued when a target is destroyed.
Public eventTargetInfoChanged
Issued when some information about a target has changed. This only happens between `targetCreated` and `targetDestroyed`.
Top
See Also