package target

Import Path
	github.com/chromedp/cdproto/target (on go.dev)

Dependency Relation
	imports 6 packages, and imported by 4 packages

Involved Source Files easyjson.go events.go Package target provides the Chrome DevTools Protocol commands, types, and events for the Target domain. Supports additional targets discovery and allows to attach to them. Generated by the cdproto-gen command. types.go
Package-Level Type Names (total 36)
/* sort by: | */
ActivateTargetParams activates (focuses) the target. TargetID ID Do executes Target.activateTarget against the provided context. MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface *ActivateTargetParams : github.com/chromedp/chromedp.Action *ActivateTargetParams : github.com/chromedp/chromedp.CallAction *ActivateTargetParams : github.com/chromedp/chromedp.EmulateAction *ActivateTargetParams : github.com/chromedp/chromedp.EvaluateAction *ActivateTargetParams : github.com/chromedp/chromedp.KeyAction *ActivateTargetParams : github.com/chromedp/chromedp.MouseAction *ActivateTargetParams : github.com/chromedp/chromedp.NavigateAction *ActivateTargetParams : github.com/chromedp/chromedp.PollAction *ActivateTargetParams : github.com/chromedp/chromedp.QueryAction ActivateTargetParams : github.com/goccy/go-json.Marshaler *ActivateTargetParams : github.com/goccy/go-json.Unmarshaler ActivateTargetParams : github.com/mailru/easyjson.Marshaler *ActivateTargetParams : github.com/mailru/easyjson.MarshalerUnmarshaler *ActivateTargetParams : github.com/mailru/easyjson.Unmarshaler ActivateTargetParams : encoding/json.Marshaler *ActivateTargetParams : encoding/json.Unmarshaler func ActivateTarget(targetID ID) *ActivateTargetParams
AttachToBrowserTargetParams attaches to the browser target, only uses flat sessionId mode. Do executes Target.attachToBrowserTarget against the provided context. returns: sessionID - Id assigned to the session. MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface AttachToBrowserTargetParams : github.com/goccy/go-json.Marshaler *AttachToBrowserTargetParams : github.com/goccy/go-json.Unmarshaler AttachToBrowserTargetParams : github.com/mailru/easyjson.Marshaler *AttachToBrowserTargetParams : github.com/mailru/easyjson.MarshalerUnmarshaler *AttachToBrowserTargetParams : github.com/mailru/easyjson.Unmarshaler AttachToBrowserTargetParams : encoding/json.Marshaler *AttachToBrowserTargetParams : encoding/json.Unmarshaler func AttachToBrowserTarget() *AttachToBrowserTargetParams
AttachToBrowserTargetReturns return values. // Id assigned to the session. MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface AttachToBrowserTargetReturns : github.com/goccy/go-json.Marshaler *AttachToBrowserTargetReturns : github.com/goccy/go-json.Unmarshaler AttachToBrowserTargetReturns : github.com/mailru/easyjson.Marshaler *AttachToBrowserTargetReturns : github.com/mailru/easyjson.MarshalerUnmarshaler *AttachToBrowserTargetReturns : github.com/mailru/easyjson.Unmarshaler AttachToBrowserTargetReturns : encoding/json.Marshaler *AttachToBrowserTargetReturns : encoding/json.Unmarshaler
AttachToTargetParams attaches to the target with given id. // Enables "flat" access to the session via specifying sessionId attribute in the commands. We plan to make this the default, deprecate non-flattened mode, and eventually retire it. See crbug.com/991325. TargetID ID Do executes Target.attachToTarget against the provided context. returns: sessionID - Id assigned to the session. MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface WithFlatten enables "flat" access to the session via specifying sessionId attribute in the commands. We plan to make this the default, deprecate non-flattened mode, and eventually retire it. See crbug.com/991325. AttachToTargetParams : github.com/goccy/go-json.Marshaler *AttachToTargetParams : github.com/goccy/go-json.Unmarshaler AttachToTargetParams : github.com/mailru/easyjson.Marshaler *AttachToTargetParams : github.com/mailru/easyjson.MarshalerUnmarshaler *AttachToTargetParams : github.com/mailru/easyjson.Unmarshaler AttachToTargetParams : encoding/json.Marshaler *AttachToTargetParams : encoding/json.Unmarshaler func AttachToTarget(targetID ID) *AttachToTargetParams func AttachToTargetParams.WithFlatten(flatten bool) *AttachToTargetParams
AttachToTargetReturns return values. // Id assigned to the session. MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface AttachToTargetReturns : github.com/goccy/go-json.Marshaler *AttachToTargetReturns : github.com/goccy/go-json.Unmarshaler AttachToTargetReturns : github.com/mailru/easyjson.Marshaler *AttachToTargetReturns : github.com/mailru/easyjson.MarshalerUnmarshaler *AttachToTargetReturns : github.com/mailru/easyjson.Unmarshaler AttachToTargetReturns : encoding/json.Marshaler *AttachToTargetReturns : encoding/json.Unmarshaler
AutoAttachRelatedParams 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. // Only targets matching filter will be attached. TargetID ID // Whether to pause new targets when attaching to them. Use Runtime.runIfWaitingForDebugger to run paused targets. Do executes Target.autoAttachRelated against the provided context. MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface WithFilter only targets matching filter will be attached. *AutoAttachRelatedParams : github.com/chromedp/chromedp.Action *AutoAttachRelatedParams : github.com/chromedp/chromedp.CallAction *AutoAttachRelatedParams : github.com/chromedp/chromedp.EmulateAction *AutoAttachRelatedParams : github.com/chromedp/chromedp.EvaluateAction *AutoAttachRelatedParams : github.com/chromedp/chromedp.KeyAction *AutoAttachRelatedParams : github.com/chromedp/chromedp.MouseAction *AutoAttachRelatedParams : github.com/chromedp/chromedp.NavigateAction *AutoAttachRelatedParams : github.com/chromedp/chromedp.PollAction *AutoAttachRelatedParams : github.com/chromedp/chromedp.QueryAction AutoAttachRelatedParams : github.com/goccy/go-json.Marshaler *AutoAttachRelatedParams : github.com/goccy/go-json.Unmarshaler AutoAttachRelatedParams : github.com/mailru/easyjson.Marshaler *AutoAttachRelatedParams : github.com/mailru/easyjson.MarshalerUnmarshaler *AutoAttachRelatedParams : github.com/mailru/easyjson.Unmarshaler AutoAttachRelatedParams : encoding/json.Marshaler *AutoAttachRelatedParams : encoding/json.Unmarshaler func AutoAttachRelated(targetID ID, waitForDebuggerOnStart bool) *AutoAttachRelatedParams func AutoAttachRelatedParams.WithFilter(filter Filter) *AutoAttachRelatedParams
CloseTargetParams closes the target. If the target is a page that gets closed too. TargetID ID Do executes Target.closeTarget against the provided context. MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface *CloseTargetParams : github.com/chromedp/chromedp.Action *CloseTargetParams : github.com/chromedp/chromedp.CallAction *CloseTargetParams : github.com/chromedp/chromedp.EmulateAction *CloseTargetParams : github.com/chromedp/chromedp.EvaluateAction *CloseTargetParams : github.com/chromedp/chromedp.KeyAction *CloseTargetParams : github.com/chromedp/chromedp.MouseAction *CloseTargetParams : github.com/chromedp/chromedp.NavigateAction *CloseTargetParams : github.com/chromedp/chromedp.PollAction *CloseTargetParams : github.com/chromedp/chromedp.QueryAction CloseTargetParams : github.com/goccy/go-json.Marshaler *CloseTargetParams : github.com/goccy/go-json.Unmarshaler CloseTargetParams : github.com/mailru/easyjson.Marshaler *CloseTargetParams : github.com/mailru/easyjson.MarshalerUnmarshaler *CloseTargetParams : github.com/mailru/easyjson.Unmarshaler CloseTargetParams : encoding/json.Marshaler *CloseTargetParams : encoding/json.Unmarshaler func CloseTarget(targetID ID) *CloseTargetParams
CreateBrowserContextParams creates a new empty BrowserContext. Similar to an incognito profile but you can have more than one. // If specified, disposes this context when debugging session disconnects. // An optional list of origins to grant unlimited cross-origin access to. Parts of the URL other than those constituting origin are ignored. // Proxy bypass list, similar to the one passed to --proxy-bypass-list // Proxy server, similar to the one passed to --proxy-server Do executes Target.createBrowserContext against the provided context. returns: browserContextID - The id of the context created. MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface WithDisposeOnDetach if specified, disposes this context when debugging session disconnects. WithOriginsWithUniversalNetworkAccess an optional list of origins to grant unlimited cross-origin access to. Parts of the URL other than those constituting origin are ignored. WithProxyBypassList proxy bypass list, similar to the one passed to --proxy-bypass-list. WithProxyServer proxy server, similar to the one passed to --proxy-server. CreateBrowserContextParams : github.com/goccy/go-json.Marshaler *CreateBrowserContextParams : github.com/goccy/go-json.Unmarshaler CreateBrowserContextParams : github.com/mailru/easyjson.Marshaler *CreateBrowserContextParams : github.com/mailru/easyjson.MarshalerUnmarshaler *CreateBrowserContextParams : github.com/mailru/easyjson.Unmarshaler CreateBrowserContextParams : encoding/json.Marshaler *CreateBrowserContextParams : encoding/json.Unmarshaler func CreateBrowserContext() *CreateBrowserContextParams func CreateBrowserContextParams.WithDisposeOnDetach(disposeOnDetach bool) *CreateBrowserContextParams func CreateBrowserContextParams.WithOriginsWithUniversalNetworkAccess(originsWithUniversalNetworkAccess []string) *CreateBrowserContextParams func CreateBrowserContextParams.WithProxyBypassList(proxyBypassList string) *CreateBrowserContextParams func CreateBrowserContextParams.WithProxyServer(proxyServer string) *CreateBrowserContextParams
CreateBrowserContextReturns return values. // The id of the context created. MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface CreateBrowserContextReturns : github.com/goccy/go-json.Marshaler *CreateBrowserContextReturns : github.com/goccy/go-json.Unmarshaler CreateBrowserContextReturns : github.com/mailru/easyjson.Marshaler *CreateBrowserContextReturns : github.com/mailru/easyjson.MarshalerUnmarshaler *CreateBrowserContextReturns : github.com/mailru/easyjson.Unmarshaler CreateBrowserContextReturns : encoding/json.Marshaler *CreateBrowserContextReturns : encoding/json.Unmarshaler
CreateTargetParams creates a new page. // Whether to create the target in background or foreground (chrome-only, false by default). // The browser context to create the page in. // Whether BeginFrames for this target will be controlled via DevTools (headless chrome only, not supported on MacOS yet, false by default). // Whether to create the target of type "tab". // Frame height in DIP (headless chrome only). // Whether to create a new Window or Tab (chrome-only, false by default). // The initial URL the page will be navigated to. An empty string indicates about:blank. // Frame width in DIP (headless chrome only). Do executes Target.createTarget against the provided context. returns: targetID - The id of the page opened. MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface WithBackground whether to create the target in background or foreground (chrome-only, false by default). WithBrowserContextID the browser context to create the page in. WithEnableBeginFrameControl whether BeginFrames for this target will be controlled via DevTools (headless chrome only, not supported on MacOS yet, false by default). WithForTab whether to create the target of type "tab". WithHeight frame height in DIP (headless chrome only). WithNewWindow whether to create a new Window or Tab (chrome-only, false by default). WithWidth frame width in DIP (headless chrome only). CreateTargetParams : github.com/goccy/go-json.Marshaler *CreateTargetParams : github.com/goccy/go-json.Unmarshaler CreateTargetParams : github.com/mailru/easyjson.Marshaler *CreateTargetParams : github.com/mailru/easyjson.MarshalerUnmarshaler *CreateTargetParams : github.com/mailru/easyjson.Unmarshaler CreateTargetParams : encoding/json.Marshaler *CreateTargetParams : encoding/json.Unmarshaler func CreateTarget(url string) *CreateTargetParams func CreateTargetParams.WithBackground(background bool) *CreateTargetParams func CreateTargetParams.WithBrowserContextID(browserContextID cdp.BrowserContextID) *CreateTargetParams func CreateTargetParams.WithEnableBeginFrameControl(enableBeginFrameControl bool) *CreateTargetParams func CreateTargetParams.WithForTab(forTab bool) *CreateTargetParams func CreateTargetParams.WithHeight(height int64) *CreateTargetParams func CreateTargetParams.WithNewWindow(newWindow bool) *CreateTargetParams func CreateTargetParams.WithWidth(width int64) *CreateTargetParams
CreateTargetReturns return values. // The id of the page opened. MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface CreateTargetReturns : github.com/goccy/go-json.Marshaler *CreateTargetReturns : github.com/goccy/go-json.Unmarshaler CreateTargetReturns : github.com/mailru/easyjson.Marshaler *CreateTargetReturns : github.com/mailru/easyjson.MarshalerUnmarshaler *CreateTargetReturns : github.com/mailru/easyjson.Unmarshaler CreateTargetReturns : encoding/json.Marshaler *CreateTargetReturns : encoding/json.Unmarshaler
DetachFromTargetParams detaches session with given id. // Id assigned to the session. Do executes Target.detachFromTarget against the provided context. MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface WithSessionID session to detach. *DetachFromTargetParams : github.com/chromedp/chromedp.Action *DetachFromTargetParams : github.com/chromedp/chromedp.CallAction *DetachFromTargetParams : github.com/chromedp/chromedp.EmulateAction *DetachFromTargetParams : github.com/chromedp/chromedp.EvaluateAction *DetachFromTargetParams : github.com/chromedp/chromedp.KeyAction *DetachFromTargetParams : github.com/chromedp/chromedp.MouseAction *DetachFromTargetParams : github.com/chromedp/chromedp.NavigateAction *DetachFromTargetParams : github.com/chromedp/chromedp.PollAction *DetachFromTargetParams : github.com/chromedp/chromedp.QueryAction DetachFromTargetParams : github.com/goccy/go-json.Marshaler *DetachFromTargetParams : github.com/goccy/go-json.Unmarshaler DetachFromTargetParams : github.com/mailru/easyjson.Marshaler *DetachFromTargetParams : github.com/mailru/easyjson.MarshalerUnmarshaler *DetachFromTargetParams : github.com/mailru/easyjson.Unmarshaler DetachFromTargetParams : encoding/json.Marshaler *DetachFromTargetParams : encoding/json.Unmarshaler func DetachFromTarget() *DetachFromTargetParams func DetachFromTargetParams.WithSessionID(sessionID SessionID) *DetachFromTargetParams
DisposeBrowserContextParams deletes a BrowserContext. All the belonging pages will be closed without calling their beforeunload hooks. BrowserContextID cdp.BrowserContextID Do executes Target.disposeBrowserContext against the provided context. MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface *DisposeBrowserContextParams : github.com/chromedp/chromedp.Action *DisposeBrowserContextParams : github.com/chromedp/chromedp.CallAction *DisposeBrowserContextParams : github.com/chromedp/chromedp.EmulateAction *DisposeBrowserContextParams : github.com/chromedp/chromedp.EvaluateAction *DisposeBrowserContextParams : github.com/chromedp/chromedp.KeyAction *DisposeBrowserContextParams : github.com/chromedp/chromedp.MouseAction *DisposeBrowserContextParams : github.com/chromedp/chromedp.NavigateAction *DisposeBrowserContextParams : github.com/chromedp/chromedp.PollAction *DisposeBrowserContextParams : github.com/chromedp/chromedp.QueryAction DisposeBrowserContextParams : github.com/goccy/go-json.Marshaler *DisposeBrowserContextParams : github.com/goccy/go-json.Unmarshaler DisposeBrowserContextParams : github.com/mailru/easyjson.Marshaler *DisposeBrowserContextParams : github.com/mailru/easyjson.MarshalerUnmarshaler *DisposeBrowserContextParams : github.com/mailru/easyjson.Unmarshaler DisposeBrowserContextParams : encoding/json.Marshaler *DisposeBrowserContextParams : encoding/json.Unmarshaler func DisposeBrowserContext(browserContextID cdp.BrowserContextID) *DisposeBrowserContextParams
EventAttachedToTarget issued when attached to target because of auto-attach or attachToTarget command. See: https://chromedevtools.github.io/devtools-protocol/tot/Target#event-attachedToTarget // Identifier assigned to the session used to send/receive messages. TargetInfo *Info WaitingForDebugger bool MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface EventAttachedToTarget : github.com/goccy/go-json.Marshaler *EventAttachedToTarget : github.com/goccy/go-json.Unmarshaler EventAttachedToTarget : github.com/mailru/easyjson.Marshaler *EventAttachedToTarget : github.com/mailru/easyjson.MarshalerUnmarshaler *EventAttachedToTarget : github.com/mailru/easyjson.Unmarshaler EventAttachedToTarget : encoding/json.Marshaler *EventAttachedToTarget : encoding/json.Unmarshaler
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. See: https://chromedevtools.github.io/devtools-protocol/tot/Target#event-detachedFromTarget // Detached session identifier. MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface EventDetachedFromTarget : github.com/goccy/go-json.Marshaler *EventDetachedFromTarget : github.com/goccy/go-json.Unmarshaler EventDetachedFromTarget : github.com/mailru/easyjson.Marshaler *EventDetachedFromTarget : github.com/mailru/easyjson.MarshalerUnmarshaler *EventDetachedFromTarget : github.com/mailru/easyjson.Unmarshaler EventDetachedFromTarget : encoding/json.Marshaler *EventDetachedFromTarget : encoding/json.Unmarshaler
EventReceivedMessageFromTarget notifies about a new protocol message received from the session (as reported in attachedToTarget event). See: https://chromedevtools.github.io/devtools-protocol/tot/Target#event-receivedMessageFromTarget Message string // Identifier of a session which sends a message. MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface EventReceivedMessageFromTarget : github.com/goccy/go-json.Marshaler *EventReceivedMessageFromTarget : github.com/goccy/go-json.Unmarshaler EventReceivedMessageFromTarget : github.com/mailru/easyjson.Marshaler *EventReceivedMessageFromTarget : github.com/mailru/easyjson.MarshalerUnmarshaler *EventReceivedMessageFromTarget : github.com/mailru/easyjson.Unmarshaler EventReceivedMessageFromTarget : encoding/json.Marshaler *EventReceivedMessageFromTarget : encoding/json.Unmarshaler
EventTargetCrashed issued when a target has crashed. See: https://chromedevtools.github.io/devtools-protocol/tot/Target#event-targetCrashed // Termination error code. // Termination status type. TargetID ID MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface EventTargetCrashed : github.com/goccy/go-json.Marshaler *EventTargetCrashed : github.com/goccy/go-json.Unmarshaler EventTargetCrashed : github.com/mailru/easyjson.Marshaler *EventTargetCrashed : github.com/mailru/easyjson.MarshalerUnmarshaler *EventTargetCrashed : github.com/mailru/easyjson.Unmarshaler EventTargetCrashed : encoding/json.Marshaler *EventTargetCrashed : encoding/json.Unmarshaler
EventTargetCreated issued when a possible inspection target is created. See: https://chromedevtools.github.io/devtools-protocol/tot/Target#event-targetCreated TargetInfo *Info MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface EventTargetCreated : github.com/goccy/go-json.Marshaler *EventTargetCreated : github.com/goccy/go-json.Unmarshaler EventTargetCreated : github.com/mailru/easyjson.Marshaler *EventTargetCreated : github.com/mailru/easyjson.MarshalerUnmarshaler *EventTargetCreated : github.com/mailru/easyjson.Unmarshaler EventTargetCreated : encoding/json.Marshaler *EventTargetCreated : encoding/json.Unmarshaler
EventTargetDestroyed issued when a target is destroyed. See: https://chromedevtools.github.io/devtools-protocol/tot/Target#event-targetDestroyed TargetID ID MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface EventTargetDestroyed : github.com/goccy/go-json.Marshaler *EventTargetDestroyed : github.com/goccy/go-json.Unmarshaler EventTargetDestroyed : github.com/mailru/easyjson.Marshaler *EventTargetDestroyed : github.com/mailru/easyjson.MarshalerUnmarshaler *EventTargetDestroyed : github.com/mailru/easyjson.Unmarshaler EventTargetDestroyed : encoding/json.Marshaler *EventTargetDestroyed : encoding/json.Unmarshaler
EventTargetInfoChanged issued when some information about a target has changed. This only happens between targetCreated and targetDestroyed. See: https://chromedevtools.github.io/devtools-protocol/tot/Target#event-targetInfoChanged TargetInfo *Info MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface EventTargetInfoChanged : github.com/goccy/go-json.Marshaler *EventTargetInfoChanged : github.com/goccy/go-json.Unmarshaler EventTargetInfoChanged : github.com/mailru/easyjson.Marshaler *EventTargetInfoChanged : github.com/mailru/easyjson.MarshalerUnmarshaler *EventTargetInfoChanged : github.com/mailru/easyjson.Unmarshaler EventTargetInfoChanged : encoding/json.Marshaler *EventTargetInfoChanged : encoding/json.Unmarshaler
ExposeDevToolsProtocolParams 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. // Binding name, 'cdp' if not specified. TargetID ID Do executes Target.exposeDevToolsProtocol against the provided context. MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface WithBindingName binding name, 'cdp' if not specified. *ExposeDevToolsProtocolParams : github.com/chromedp/chromedp.Action *ExposeDevToolsProtocolParams : github.com/chromedp/chromedp.CallAction *ExposeDevToolsProtocolParams : github.com/chromedp/chromedp.EmulateAction *ExposeDevToolsProtocolParams : github.com/chromedp/chromedp.EvaluateAction *ExposeDevToolsProtocolParams : github.com/chromedp/chromedp.KeyAction *ExposeDevToolsProtocolParams : github.com/chromedp/chromedp.MouseAction *ExposeDevToolsProtocolParams : github.com/chromedp/chromedp.NavigateAction *ExposeDevToolsProtocolParams : github.com/chromedp/chromedp.PollAction *ExposeDevToolsProtocolParams : github.com/chromedp/chromedp.QueryAction ExposeDevToolsProtocolParams : github.com/goccy/go-json.Marshaler *ExposeDevToolsProtocolParams : github.com/goccy/go-json.Unmarshaler ExposeDevToolsProtocolParams : github.com/mailru/easyjson.Marshaler *ExposeDevToolsProtocolParams : github.com/mailru/easyjson.MarshalerUnmarshaler *ExposeDevToolsProtocolParams : github.com/mailru/easyjson.Unmarshaler ExposeDevToolsProtocolParams : encoding/json.Marshaler *ExposeDevToolsProtocolParams : encoding/json.Unmarshaler func ExposeDevToolsProtocol(targetID ID) *ExposeDevToolsProtocolParams func ExposeDevToolsProtocolParams.WithBindingName(bindingName string) *ExposeDevToolsProtocolParams
Filter the entries in TargetFilter are matched sequentially against targets and the first entry that matches determines if the target is included or not, depending on the value of exclude field in the entry. If filter is not specified, the one assumed is [{type: "browser", exclude: true}, {type: "tab", exclude: true}, {}] (i.e. include everything but browser and tab). See: https://chromedevtools.github.io/devtools-protocol/tot/Target#type-TargetFilter func AutoAttachRelatedParams.WithFilter(filter Filter) *AutoAttachRelatedParams func GetTargetsParams.WithFilter(filter Filter) *GetTargetsParams func SetAutoAttachParams.WithFilter(filter Filter) *SetAutoAttachParams func SetDiscoverTargetsParams.WithFilter(filter Filter) *SetDiscoverTargetsParams
FilterEntry a filter used by target query/discovery/auto-attach operations. See: https://chromedevtools.github.io/devtools-protocol/tot/Target#type-FilterEntry // If set, causes exclusion of mathcing targets from the list. // If not present, matches any type. MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface FilterEntry : github.com/goccy/go-json.Marshaler *FilterEntry : github.com/goccy/go-json.Unmarshaler FilterEntry : github.com/mailru/easyjson.Marshaler *FilterEntry : github.com/mailru/easyjson.MarshalerUnmarshaler *FilterEntry : github.com/mailru/easyjson.Unmarshaler FilterEntry : encoding/json.Marshaler *FilterEntry : encoding/json.Unmarshaler
GetBrowserContextsParams returns all browser contexts created with Target.createBrowserContext method. Do executes Target.getBrowserContexts against the provided context. returns: browserContextIDs - An array of browser context ids. MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface GetBrowserContextsParams : github.com/goccy/go-json.Marshaler *GetBrowserContextsParams : github.com/goccy/go-json.Unmarshaler GetBrowserContextsParams : github.com/mailru/easyjson.Marshaler *GetBrowserContextsParams : github.com/mailru/easyjson.MarshalerUnmarshaler *GetBrowserContextsParams : github.com/mailru/easyjson.Unmarshaler GetBrowserContextsParams : encoding/json.Marshaler *GetBrowserContextsParams : encoding/json.Unmarshaler func GetBrowserContexts() *GetBrowserContextsParams
GetBrowserContextsReturns return values. // An array of browser context ids. MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface GetBrowserContextsReturns : github.com/goccy/go-json.Marshaler *GetBrowserContextsReturns : github.com/goccy/go-json.Unmarshaler GetBrowserContextsReturns : github.com/mailru/easyjson.Marshaler *GetBrowserContextsReturns : github.com/mailru/easyjson.MarshalerUnmarshaler *GetBrowserContextsReturns : github.com/mailru/easyjson.Unmarshaler GetBrowserContextsReturns : encoding/json.Marshaler *GetBrowserContextsReturns : encoding/json.Unmarshaler
GetTargetInfoParams returns information about a target. // The id of the page opened. Do executes Target.getTargetInfo against the provided context. returns: targetInfo MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface WithTargetID [no description]. GetTargetInfoParams : github.com/goccy/go-json.Marshaler *GetTargetInfoParams : github.com/goccy/go-json.Unmarshaler GetTargetInfoParams : github.com/mailru/easyjson.Marshaler *GetTargetInfoParams : github.com/mailru/easyjson.MarshalerUnmarshaler *GetTargetInfoParams : github.com/mailru/easyjson.Unmarshaler GetTargetInfoParams : encoding/json.Marshaler *GetTargetInfoParams : encoding/json.Unmarshaler func GetTargetInfo() *GetTargetInfoParams func GetTargetInfoParams.WithTargetID(targetID ID) *GetTargetInfoParams
GetTargetInfoReturns return values. TargetInfo *Info MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface GetTargetInfoReturns : github.com/goccy/go-json.Marshaler *GetTargetInfoReturns : github.com/goccy/go-json.Unmarshaler GetTargetInfoReturns : github.com/mailru/easyjson.Marshaler *GetTargetInfoReturns : github.com/mailru/easyjson.MarshalerUnmarshaler *GetTargetInfoReturns : github.com/mailru/easyjson.Unmarshaler GetTargetInfoReturns : encoding/json.Marshaler *GetTargetInfoReturns : encoding/json.Unmarshaler
GetTargetsParams retrieves a list of available targets. // Only targets matching filter will be reported. If filter is not specified and target discovery is currently enabled, a filter used for target discovery is used for consistency. Do executes Target.getTargets against the provided context. returns: targetInfos - The list of targets. MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface WithFilter only targets matching filter will be reported. If filter is not specified and target discovery is currently enabled, a filter used for target discovery is used for consistency. GetTargetsParams : github.com/goccy/go-json.Marshaler *GetTargetsParams : github.com/goccy/go-json.Unmarshaler GetTargetsParams : github.com/mailru/easyjson.Marshaler *GetTargetsParams : github.com/mailru/easyjson.MarshalerUnmarshaler *GetTargetsParams : github.com/mailru/easyjson.Unmarshaler GetTargetsParams : encoding/json.Marshaler *GetTargetsParams : encoding/json.Unmarshaler func GetTargets() *GetTargetsParams func GetTargetsParams.WithFilter(filter Filter) *GetTargetsParams
GetTargetsReturns return values. // The list of targets. MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface GetTargetsReturns : github.com/goccy/go-json.Marshaler *GetTargetsReturns : github.com/goccy/go-json.Unmarshaler GetTargetsReturns : github.com/mailru/easyjson.Marshaler *GetTargetsReturns : github.com/mailru/easyjson.MarshalerUnmarshaler *GetTargetsReturns : github.com/mailru/easyjson.Unmarshaler GetTargetsReturns : encoding/json.Marshaler *GetTargetsReturns : encoding/json.Unmarshaler
ID [no description]. See: https://chromedevtools.github.io/devtools-protocol/tot/Target#type-TargetID String returns the ID as string value. ID : expvar.Var ID : fmt.Stringer func (*CreateTargetParams).Do(ctx context.Context) (targetID ID, err error) func github.com/chromedp/chromedp.WaitNewTarget(ctx context.Context, fn func(*Info) bool) <-chan ID func ActivateTarget(targetID ID) *ActivateTargetParams func AttachToTarget(targetID ID) *AttachToTargetParams func AutoAttachRelated(targetID ID, waitForDebuggerOnStart bool) *AutoAttachRelatedParams func CloseTarget(targetID ID) *CloseTargetParams func ExposeDevToolsProtocol(targetID ID) *ExposeDevToolsProtocolParams func GetTargetInfoParams.WithTargetID(targetID ID) *GetTargetInfoParams func github.com/chromedp/cdproto/browser.GetWindowForTargetParams.WithTargetID(targetID ID) *browser.GetWindowForTargetParams func github.com/chromedp/chromedp.WithTargetID(id ID) chromedp.ContextOption
Info [no description]. See: https://chromedevtools.github.io/devtools-protocol/tot/Target#type-TargetInfo // Whether the target has an attached client. BrowserContextID cdp.BrowserContextID // Whether the target has access to the originating window. // Frame id of originating window (is only set if target has an opener). // Opener target Id // Provides additional details for specific target types. For example, for the type of "page", this may be set to "portal" or "prerender". TargetID ID Title string Type string URL string MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface Info : github.com/goccy/go-json.Marshaler *Info : github.com/goccy/go-json.Unmarshaler Info : github.com/mailru/easyjson.Marshaler *Info : github.com/mailru/easyjson.MarshalerUnmarshaler *Info : github.com/mailru/easyjson.Unmarshaler Info : encoding/json.Marshaler *Info : encoding/json.Unmarshaler func (*GetTargetInfoParams).Do(ctx context.Context) (targetInfo *Info, err error) func (*GetTargetsParams).Do(ctx context.Context) (targetInfos []*Info, err error) func github.com/chromedp/chromedp.Targets(ctx context.Context) ([]*Info, error)
RemoteLocation [no description]. See: https://chromedevtools.github.io/devtools-protocol/tot/Target#type-RemoteLocation Host string Port int64 MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface RemoteLocation : github.com/goccy/go-json.Marshaler *RemoteLocation : github.com/goccy/go-json.Unmarshaler RemoteLocation : github.com/mailru/easyjson.Marshaler *RemoteLocation : github.com/mailru/easyjson.MarshalerUnmarshaler *RemoteLocation : github.com/mailru/easyjson.Unmarshaler RemoteLocation : encoding/json.Marshaler *RemoteLocation : encoding/json.Unmarshaler func SetRemoteLocations(locations []*RemoteLocation) *SetRemoteLocationsParams
SessionID unique identifier of attached debugging session. See: https://chromedevtools.github.io/devtools-protocol/tot/Target#type-SessionID String returns the SessionID as string value. SessionID : expvar.Var SessionID : fmt.Stringer func (*AttachToBrowserTargetParams).Do(ctx context.Context) (sessionID SessionID, err error) func (*AttachToTargetParams).Do(ctx context.Context) (sessionID SessionID, err error) func DetachFromTargetParams.WithSessionID(sessionID SessionID) *DetachFromTargetParams
SetAutoAttachParams 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. // Whether to auto-attach to related targets. // Only targets matching filter will be attached. // Enables "flat" access to the session via specifying sessionId attribute in the commands. We plan to make this the default, deprecate non-flattened mode, and eventually retire it. See crbug.com/991325. // Whether to pause new targets when attaching to them. Use Runtime.runIfWaitingForDebugger to run paused targets. Do executes Target.setAutoAttach against the provided context. MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface WithFilter only targets matching filter will be attached. WithFlatten enables "flat" access to the session via specifying sessionId attribute in the commands. We plan to make this the default, deprecate non-flattened mode, and eventually retire it. See crbug.com/991325. *SetAutoAttachParams : github.com/chromedp/chromedp.Action *SetAutoAttachParams : github.com/chromedp/chromedp.CallAction *SetAutoAttachParams : github.com/chromedp/chromedp.EmulateAction *SetAutoAttachParams : github.com/chromedp/chromedp.EvaluateAction *SetAutoAttachParams : github.com/chromedp/chromedp.KeyAction *SetAutoAttachParams : github.com/chromedp/chromedp.MouseAction *SetAutoAttachParams : github.com/chromedp/chromedp.NavigateAction *SetAutoAttachParams : github.com/chromedp/chromedp.PollAction *SetAutoAttachParams : github.com/chromedp/chromedp.QueryAction SetAutoAttachParams : github.com/goccy/go-json.Marshaler *SetAutoAttachParams : github.com/goccy/go-json.Unmarshaler SetAutoAttachParams : github.com/mailru/easyjson.Marshaler *SetAutoAttachParams : github.com/mailru/easyjson.MarshalerUnmarshaler *SetAutoAttachParams : github.com/mailru/easyjson.Unmarshaler SetAutoAttachParams : encoding/json.Marshaler *SetAutoAttachParams : encoding/json.Unmarshaler func SetAutoAttach(autoAttach bool, waitForDebuggerOnStart bool) *SetAutoAttachParams func SetAutoAttachParams.WithFilter(filter Filter) *SetAutoAttachParams func SetAutoAttachParams.WithFlatten(flatten bool) *SetAutoAttachParams
SetDiscoverTargetsParams controls whether to discover available targets and notify via targetCreated/targetInfoChanged/targetDestroyed events. // Whether to discover available targets. // Only targets matching filter will be attached. If discover is false, filter must be omitted or empty. Do executes Target.setDiscoverTargets against the provided context. MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface WithFilter only targets matching filter will be attached. If discover is false, filter must be omitted or empty. *SetDiscoverTargetsParams : github.com/chromedp/chromedp.Action *SetDiscoverTargetsParams : github.com/chromedp/chromedp.CallAction *SetDiscoverTargetsParams : github.com/chromedp/chromedp.EmulateAction *SetDiscoverTargetsParams : github.com/chromedp/chromedp.EvaluateAction *SetDiscoverTargetsParams : github.com/chromedp/chromedp.KeyAction *SetDiscoverTargetsParams : github.com/chromedp/chromedp.MouseAction *SetDiscoverTargetsParams : github.com/chromedp/chromedp.NavigateAction *SetDiscoverTargetsParams : github.com/chromedp/chromedp.PollAction *SetDiscoverTargetsParams : github.com/chromedp/chromedp.QueryAction SetDiscoverTargetsParams : github.com/goccy/go-json.Marshaler *SetDiscoverTargetsParams : github.com/goccy/go-json.Unmarshaler SetDiscoverTargetsParams : github.com/mailru/easyjson.Marshaler *SetDiscoverTargetsParams : github.com/mailru/easyjson.MarshalerUnmarshaler *SetDiscoverTargetsParams : github.com/mailru/easyjson.Unmarshaler SetDiscoverTargetsParams : encoding/json.Marshaler *SetDiscoverTargetsParams : encoding/json.Unmarshaler func SetDiscoverTargets(discover bool) *SetDiscoverTargetsParams func SetDiscoverTargetsParams.WithFilter(filter Filter) *SetDiscoverTargetsParams
SetRemoteLocationsParams enables target discovery for the specified locations, when setDiscoverTargets was set to true. // List of remote locations. Do executes Target.setRemoteLocations against the provided context. MarshalEasyJSON supports easyjson.Marshaler interface MarshalJSON supports json.Marshaler interface UnmarshalEasyJSON supports easyjson.Unmarshaler interface UnmarshalJSON supports json.Unmarshaler interface *SetRemoteLocationsParams : github.com/chromedp/chromedp.Action *SetRemoteLocationsParams : github.com/chromedp/chromedp.CallAction *SetRemoteLocationsParams : github.com/chromedp/chromedp.EmulateAction *SetRemoteLocationsParams : github.com/chromedp/chromedp.EvaluateAction *SetRemoteLocationsParams : github.com/chromedp/chromedp.KeyAction *SetRemoteLocationsParams : github.com/chromedp/chromedp.MouseAction *SetRemoteLocationsParams : github.com/chromedp/chromedp.NavigateAction *SetRemoteLocationsParams : github.com/chromedp/chromedp.PollAction *SetRemoteLocationsParams : github.com/chromedp/chromedp.QueryAction SetRemoteLocationsParams : github.com/goccy/go-json.Marshaler *SetRemoteLocationsParams : github.com/goccy/go-json.Unmarshaler SetRemoteLocationsParams : github.com/mailru/easyjson.Marshaler *SetRemoteLocationsParams : github.com/mailru/easyjson.MarshalerUnmarshaler *SetRemoteLocationsParams : github.com/mailru/easyjson.Unmarshaler SetRemoteLocationsParams : encoding/json.Marshaler *SetRemoteLocationsParams : encoding/json.Unmarshaler func SetRemoteLocations(locations []*RemoteLocation) *SetRemoteLocationsParams
Package-Level Functions (total 16)
ActivateTarget activates (focuses) the target. See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-activateTarget parameters: targetID
AttachToBrowserTarget attaches to the browser target, only uses flat sessionId mode. See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-attachToBrowserTarget
AttachToTarget attaches to the target with given id. See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-attachToTarget parameters: targetID
AutoAttachRelated 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. See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-autoAttachRelated parameters: targetID waitForDebuggerOnStart - Whether to pause new targets when attaching to them. Use Runtime.runIfWaitingForDebugger to run paused targets.
CloseTarget closes the target. If the target is a page that gets closed too. See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-closeTarget parameters: targetID
CreateBrowserContext creates a new empty BrowserContext. Similar to an incognito profile but you can have more than one. See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-createBrowserContext parameters:
CreateTarget creates a new page. See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-createTarget parameters: url - The initial URL the page will be navigated to. An empty string indicates about:blank.
DisposeBrowserContext deletes a BrowserContext. All the belonging pages will be closed without calling their beforeunload hooks. See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-disposeBrowserContext parameters: browserContextID
ExposeDevToolsProtocol 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. See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-exposeDevToolsProtocol parameters: targetID
GetBrowserContexts returns all browser contexts created with Target.createBrowserContext method. See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-getBrowserContexts
GetTargetInfo returns information about a target. See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-getTargetInfo parameters:
GetTargets retrieves a list of available targets. See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-getTargets parameters:
SetAutoAttach 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. See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-setAutoAttach parameters: autoAttach - Whether to auto-attach to related targets. waitForDebuggerOnStart - Whether to pause new targets when attaching to them. Use Runtime.runIfWaitingForDebugger to run paused targets.
SetDiscoverTargets controls whether to discover available targets and notify via targetCreated/targetInfoChanged/targetDestroyed events. See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-setDiscoverTargets parameters: discover - Whether to discover available targets.
SetRemoteLocations enables target discovery for the specified locations, when setDiscoverTargets was set to true. See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-setRemoteLocations parameters: locations - List of remote locations.
Package-Level Constants (total 16)
Command names.
Command names.
Command names.
Command names.
Command names.
Command names.
Command names.
Command names.
Command names.
Command names.
Command names.
Command names.
Command names.
Command names.
Command names.
Command names.