| // Code generated by cdpgen. DO NOT EDIT. |
| |
| package cdp |
| |
| import ( |
| "context" |
| |
| "github.com/mafredri/cdp/protocol/accessibility" |
| "github.com/mafredri/cdp/protocol/animation" |
| "github.com/mafredri/cdp/protocol/applicationcache" |
| "github.com/mafredri/cdp/protocol/audits" |
| "github.com/mafredri/cdp/protocol/backgroundservice" |
| "github.com/mafredri/cdp/protocol/browser" |
| "github.com/mafredri/cdp/protocol/cachestorage" |
| "github.com/mafredri/cdp/protocol/cast" |
| "github.com/mafredri/cdp/protocol/console" |
| "github.com/mafredri/cdp/protocol/css" |
| "github.com/mafredri/cdp/protocol/database" |
| "github.com/mafredri/cdp/protocol/debugger" |
| "github.com/mafredri/cdp/protocol/deviceorientation" |
| "github.com/mafredri/cdp/protocol/dom" |
| "github.com/mafredri/cdp/protocol/domdebugger" |
| "github.com/mafredri/cdp/protocol/domsnapshot" |
| "github.com/mafredri/cdp/protocol/domstorage" |
| "github.com/mafredri/cdp/protocol/emulation" |
| "github.com/mafredri/cdp/protocol/fetch" |
| "github.com/mafredri/cdp/protocol/headlessexperimental" |
| "github.com/mafredri/cdp/protocol/heapprofiler" |
| "github.com/mafredri/cdp/protocol/indexeddb" |
| "github.com/mafredri/cdp/protocol/input" |
| "github.com/mafredri/cdp/protocol/inspector" |
| "github.com/mafredri/cdp/protocol/io" |
| "github.com/mafredri/cdp/protocol/layertree" |
| "github.com/mafredri/cdp/protocol/log" |
| "github.com/mafredri/cdp/protocol/media" |
| "github.com/mafredri/cdp/protocol/memory" |
| "github.com/mafredri/cdp/protocol/network" |
| "github.com/mafredri/cdp/protocol/overlay" |
| "github.com/mafredri/cdp/protocol/page" |
| "github.com/mafredri/cdp/protocol/performance" |
| "github.com/mafredri/cdp/protocol/profiler" |
| "github.com/mafredri/cdp/protocol/runtime" |
| "github.com/mafredri/cdp/protocol/schema" |
| "github.com/mafredri/cdp/protocol/security" |
| "github.com/mafredri/cdp/protocol/serviceworker" |
| "github.com/mafredri/cdp/protocol/storage" |
| "github.com/mafredri/cdp/protocol/systeminfo" |
| "github.com/mafredri/cdp/protocol/target" |
| "github.com/mafredri/cdp/protocol/tethering" |
| "github.com/mafredri/cdp/protocol/tracing" |
| "github.com/mafredri/cdp/protocol/webaudio" |
| "github.com/mafredri/cdp/protocol/webauthn" |
| ) |
| |
| // The Accessibility domain. |
| // |
| // Note: This domain is experimental. |
| type Accessibility interface { |
| // Command Disable |
| // |
| // Disables the accessibility domain. |
| Disable(context.Context) error |
| |
| // Command Enable |
| // |
| // Enables the accessibility domain which causes `AXNodeId`s to remain |
| // consistent between method calls. This turns on accessibility for the |
| // page, which can impact performance until accessibility is disabled. |
| Enable(context.Context) error |
| |
| // Command GetPartialAXTree |
| // |
| // Fetches the accessibility node and partial accessibility tree for |
| // this DOM node, if it exists. |
| // |
| // Note: This command is experimental. |
| GetPartialAXTree(context.Context, *accessibility.GetPartialAXTreeArgs) (*accessibility.GetPartialAXTreeReply, error) |
| |
| // Command GetFullAXTree |
| // |
| // Fetches the entire accessibility tree |
| // |
| // Note: This command is experimental. |
| GetFullAXTree(context.Context) (*accessibility.GetFullAXTreeReply, error) |
| } |
| |
| // The Animation domain. |
| // |
| // Note: This domain is experimental. |
| type Animation interface { |
| // Command Disable |
| // |
| // Disables animation domain notifications. |
| Disable(context.Context) error |
| |
| // Command Enable |
| // |
| // Enables animation domain notifications. |
| Enable(context.Context) error |
| |
| // Command GetCurrentTime |
| // |
| // Returns the current time of the an animation. |
| GetCurrentTime(context.Context, *animation.GetCurrentTimeArgs) (*animation.GetCurrentTimeReply, error) |
| |
| // Command GetPlaybackRate |
| // |
| // Gets the playback rate of the document timeline. |
| GetPlaybackRate(context.Context) (*animation.GetPlaybackRateReply, error) |
| |
| // Command ReleaseAnimations |
| // |
| // Releases a set of animations to no longer be manipulated. |
| ReleaseAnimations(context.Context, *animation.ReleaseAnimationsArgs) error |
| |
| // Command ResolveAnimation |
| // |
| // Gets the remote object of the Animation. |
| ResolveAnimation(context.Context, *animation.ResolveAnimationArgs) (*animation.ResolveAnimationReply, error) |
| |
| // Command SeekAnimations |
| // |
| // Seek a set of animations to a particular time within each |
| // animation. |
| SeekAnimations(context.Context, *animation.SeekAnimationsArgs) error |
| |
| // Command SetPaused |
| // |
| // Sets the paused state of a set of animations. |
| SetPaused(context.Context, *animation.SetPausedArgs) error |
| |
| // Command SetPlaybackRate |
| // |
| // Sets the playback rate of the document timeline. |
| SetPlaybackRate(context.Context, *animation.SetPlaybackRateArgs) error |
| |
| // Command SetTiming |
| // |
| // Sets the timing of an animation node. |
| SetTiming(context.Context, *animation.SetTimingArgs) error |
| |
| // Event AnimationCanceled |
| // |
| // Event for when an animation has been canceled. |
| AnimationCanceled(context.Context) (animation.CanceledClient, error) |
| |
| // Event AnimationCreated |
| // |
| // Event for each animation that has been created. |
| AnimationCreated(context.Context) (animation.CreatedClient, error) |
| |
| // Event AnimationStarted |
| // |
| // Event for animation that has been started. |
| AnimationStarted(context.Context) (animation.StartedClient, error) |
| } |
| |
| // The ApplicationCache domain. |
| // |
| // Note: This domain is experimental. |
| type ApplicationCache interface { |
| // Command Enable |
| // |
| // Enables application cache domain notifications. |
| Enable(context.Context) error |
| |
| // Command GetApplicationCacheForFrame |
| // |
| // Returns relevant application cache data for the document in given |
| // frame. |
| GetApplicationCacheForFrame(context.Context, *applicationcache.GetApplicationCacheForFrameArgs) (*applicationcache.GetApplicationCacheForFrameReply, error) |
| |
| // Command GetFramesWithManifests |
| // |
| // Returns array of frame identifiers with manifest urls for each |
| // frame containing a document associated with some application cache. |
| GetFramesWithManifests(context.Context) (*applicationcache.GetFramesWithManifestsReply, error) |
| |
| // Command GetManifestForFrame |
| // |
| // Returns manifest URL for document in the given frame. |
| GetManifestForFrame(context.Context, *applicationcache.GetManifestForFrameArgs) (*applicationcache.GetManifestForFrameReply, error) |
| |
| // Event ApplicationCacheStatusUpdated |
| ApplicationCacheStatusUpdated(context.Context) (applicationcache.StatusUpdatedClient, error) |
| |
| // Event NetworkStateUpdated |
| NetworkStateUpdated(context.Context) (applicationcache.NetworkStateUpdatedClient, error) |
| } |
| |
| // The Audits domain. Audits domain allows investigation of page violations |
| // and possible improvements. |
| // |
| // Note: This domain is experimental. |
| type Audits interface { |
| // Command GetEncodedResponse |
| // |
| // Returns the response body and size if it were re-encoded with the |
| // specified settings. Only applies to images. |
| GetEncodedResponse(context.Context, *audits.GetEncodedResponseArgs) (*audits.GetEncodedResponseReply, error) |
| |
| // Command Disable |
| // |
| // Disables issues domain, prevents further issues from being reported |
| // to the client. |
| Disable(context.Context) error |
| |
| // Command Enable |
| // |
| // Enables issues domain, sends the issues collected so far to the |
| // client by means of the `issueAdded` event. |
| Enable(context.Context) error |
| |
| // Event IssueAdded |
| IssueAdded(context.Context) (audits.IssueAddedClient, error) |
| } |
| |
| // The BackgroundService domain. Defines events for background web platform |
| // features. |
| // |
| // Note: This domain is experimental. |
| type BackgroundService interface { |
| // Command StartObserving |
| // |
| // Enables event updates for the service. |
| StartObserving(context.Context, *backgroundservice.StartObservingArgs) error |
| |
| // Command StopObserving |
| // |
| // Disables event updates for the service. |
| StopObserving(context.Context, *backgroundservice.StopObservingArgs) error |
| |
| // Command SetRecording |
| // |
| // Set the recording state for the service. |
| SetRecording(context.Context, *backgroundservice.SetRecordingArgs) error |
| |
| // Command ClearEvents |
| // |
| // Clears all stored data for the service. |
| ClearEvents(context.Context, *backgroundservice.ClearEventsArgs) error |
| |
| // Event RecordingStateChanged |
| // |
| // Called when the recording state for the service has been updated. |
| RecordingStateChanged(context.Context) (backgroundservice.RecordingStateChangedClient, error) |
| |
| // Event BackgroundServiceEventReceived |
| // |
| // Called with all existing backgroundServiceEvents when enabled, and |
| // all new events afterwards if enabled and recording. |
| BackgroundServiceEventReceived(context.Context) (backgroundservice.EventReceivedClient, error) |
| } |
| |
| // The Browser domain. The Browser domain defines methods and events for |
| // browser managing. |
| type Browser interface { |
| // Command SetPermission |
| // |
| // Set permission settings for given origin. |
| // |
| // Note: This command is experimental. |
| SetPermission(context.Context, *browser.SetPermissionArgs) error |
| |
| // Command GrantPermissions |
| // |
| // Grant specific permissions to the given origin and reject all |
| // others. |
| // |
| // Note: This command is experimental. |
| GrantPermissions(context.Context, *browser.GrantPermissionsArgs) error |
| |
| // Command ResetPermissions |
| // |
| // Reset all permission management for all origins. |
| // |
| // Note: This command is experimental. |
| ResetPermissions(context.Context, *browser.ResetPermissionsArgs) error |
| |
| // Command SetDownloadBehavior |
| // |
| // Set the behavior when downloading a file. |
| // |
| // Note: This command is experimental. |
| SetDownloadBehavior(context.Context, *browser.SetDownloadBehaviorArgs) error |
| |
| // Command Close |
| // |
| // Close browser gracefully. |
| Close(context.Context) error |
| |
| // Command Crash |
| // |
| // Crashes browser on the main thread. |
| // |
| // Note: This command is experimental. |
| Crash(context.Context) error |
| |
| // Command CrashGPUProcess |
| // |
| // Crashes GPU process. |
| // |
| // Note: This command is experimental. |
| CrashGPUProcess(context.Context) error |
| |
| // Command GetVersion |
| // |
| // Returns version information. |
| GetVersion(context.Context) (*browser.GetVersionReply, error) |
| |
| // Command GetBrowserCommandLine |
| // |
| // Returns the command line switches for the browser process if, and |
| // only if --enable-automation is on the commandline. |
| // |
| // Note: This command is experimental. |
| GetBrowserCommandLine(context.Context) (*browser.GetBrowserCommandLineReply, error) |
| |
| // Command GetHistograms |
| // |
| // Get Chrome histograms. |
| // |
| // Note: This command is experimental. |
| GetHistograms(context.Context, *browser.GetHistogramsArgs) (*browser.GetHistogramsReply, error) |
| |
| // Command GetHistogram |
| // |
| // Get a Chrome histogram by name. |
| // |
| // Note: This command is experimental. |
| GetHistogram(context.Context, *browser.GetHistogramArgs) (*browser.GetHistogramReply, error) |
| |
| // Command GetWindowBounds |
| // |
| // Get position and size of the browser window. |
| // |
| // Note: This command is experimental. |
| GetWindowBounds(context.Context, *browser.GetWindowBoundsArgs) (*browser.GetWindowBoundsReply, error) |
| |
| // Command GetWindowForTarget |
| // |
| // Get the browser window that contains the devtools target. |
| // |
| // Note: This command is experimental. |
| GetWindowForTarget(context.Context, *browser.GetWindowForTargetArgs) (*browser.GetWindowForTargetReply, error) |
| |
| // Command SetWindowBounds |
| // |
| // Set position and/or size of the browser window. |
| // |
| // Note: This command is experimental. |
| SetWindowBounds(context.Context, *browser.SetWindowBoundsArgs) error |
| |
| // Command SetDockTile |
| // |
| // Set dock tile details, platform-specific. |
| // |
| // Note: This command is experimental. |
| SetDockTile(context.Context, *browser.SetDockTileArgs) error |
| } |
| |
| // The CSS domain. This domain exposes CSS read/write operations. All CSS |
| // objects (stylesheets, rules, and styles) have an associated `id` used in |
| // subsequent operations on the related object. Each object type has a specific |
| // `id` structure, and those are not interchangeable between objects of |
| // different kinds. CSS objects can be loaded using the `get*ForNode()` calls |
| // (which accept a DOM node id). A client can also keep track of stylesheets |
| // via the `styleSheetAdded`/`styleSheetRemoved` events and subsequently load |
| // the required stylesheet contents using the `getStyleSheet[Text]()` methods. |
| // |
| // Note: This domain is experimental. |
| type CSS interface { |
| // Command AddRule |
| // |
| // Inserts a new rule with the given `ruleText` in a stylesheet with |
| // given `styleSheetId`, at the position specified by `location`. |
| AddRule(context.Context, *css.AddRuleArgs) (*css.AddRuleReply, error) |
| |
| // Command CollectClassNames |
| // |
| // Returns all class names from specified stylesheet. |
| CollectClassNames(context.Context, *css.CollectClassNamesArgs) (*css.CollectClassNamesReply, error) |
| |
| // Command CreateStyleSheet |
| // |
| // Creates a new special "via-inspector" stylesheet in the frame with |
| // given `frameId`. |
| CreateStyleSheet(context.Context, *css.CreateStyleSheetArgs) (*css.CreateStyleSheetReply, error) |
| |
| // Command Disable |
| // |
| // Disables the CSS agent for the given page. |
| Disable(context.Context) error |
| |
| // Command Enable |
| // |
| // Enables the CSS agent for the given page. Clients should not assume |
| // that the CSS agent has been enabled until the result of this command |
| // is received. |
| Enable(context.Context) error |
| |
| // Command ForcePseudoState |
| // |
| // Ensures that the given node will have specified pseudo-classes |
| // whenever its style is computed by the browser. |
| ForcePseudoState(context.Context, *css.ForcePseudoStateArgs) error |
| |
| // Command GetBackgroundColors |
| GetBackgroundColors(context.Context, *css.GetBackgroundColorsArgs) (*css.GetBackgroundColorsReply, error) |
| |
| // Command GetComputedStyleForNode |
| // |
| // Returns the computed style for a DOM node identified by `nodeId`. |
| GetComputedStyleForNode(context.Context, *css.GetComputedStyleForNodeArgs) (*css.GetComputedStyleForNodeReply, error) |
| |
| // Command GetInlineStylesForNode |
| // |
| // Returns the styles defined inline (explicitly in the "style" |
| // attribute and implicitly, using DOM attributes) for a DOM node |
| // identified by `nodeId`. |
| GetInlineStylesForNode(context.Context, *css.GetInlineStylesForNodeArgs) (*css.GetInlineStylesForNodeReply, error) |
| |
| // Command GetMatchedStylesForNode |
| // |
| // Returns requested styles for a DOM node identified by `nodeId`. |
| GetMatchedStylesForNode(context.Context, *css.GetMatchedStylesForNodeArgs) (*css.GetMatchedStylesForNodeReply, error) |
| |
| // Command GetMediaQueries |
| // |
| // Returns all media queries parsed by the rendering engine. |
| GetMediaQueries(context.Context) (*css.GetMediaQueriesReply, error) |
| |
| // Command GetPlatformFontsForNode |
| // |
| // Requests information about platform fonts which we used to render |
| // child TextNodes in the given node. |
| GetPlatformFontsForNode(context.Context, *css.GetPlatformFontsForNodeArgs) (*css.GetPlatformFontsForNodeReply, error) |
| |
| // Command GetStyleSheetText |
| // |
| // Returns the current textual content for a stylesheet. |
| GetStyleSheetText(context.Context, *css.GetStyleSheetTextArgs) (*css.GetStyleSheetTextReply, error) |
| |
| // Command SetEffectivePropertyValueForNode |
| // |
| // Find a rule with the given active property for the given node and |
| // set the new value for this property |
| SetEffectivePropertyValueForNode(context.Context, *css.SetEffectivePropertyValueForNodeArgs) error |
| |
| // Command SetKeyframeKey |
| // |
| // Modifies the keyframe rule key text. |
| SetKeyframeKey(context.Context, *css.SetKeyframeKeyArgs) (*css.SetKeyframeKeyReply, error) |
| |
| // Command SetMediaText |
| // |
| // Modifies the rule selector. |
| SetMediaText(context.Context, *css.SetMediaTextArgs) (*css.SetMediaTextReply, error) |
| |
| // Command SetRuleSelector |
| // |
| // Modifies the rule selector. |
| SetRuleSelector(context.Context, *css.SetRuleSelectorArgs) (*css.SetRuleSelectorReply, error) |
| |
| // Command SetStyleSheetText |
| // |
| // Sets the new stylesheet text. |
| SetStyleSheetText(context.Context, *css.SetStyleSheetTextArgs) (*css.SetStyleSheetTextReply, error) |
| |
| // Command SetStyleTexts |
| // |
| // Applies specified style edits one after another in the given order. |
| SetStyleTexts(context.Context, *css.SetStyleTextsArgs) (*css.SetStyleTextsReply, error) |
| |
| // Command StartRuleUsageTracking |
| // |
| // Enables the selector recording. |
| StartRuleUsageTracking(context.Context) error |
| |
| // Command StopRuleUsageTracking |
| // |
| // Stop tracking rule usage and return the list of rules that were |
| // used since last call to `takeCoverageDelta` (or since start of |
| // coverage instrumentation) |
| StopRuleUsageTracking(context.Context) (*css.StopRuleUsageTrackingReply, error) |
| |
| // Command TakeCoverageDelta |
| // |
| // Obtain list of rules that became used since last call to this |
| // method (or since start of coverage instrumentation) |
| TakeCoverageDelta(context.Context) (*css.TakeCoverageDeltaReply, error) |
| |
| // Event FontsUpdated |
| // |
| // Fires whenever a web font is updated. A non-empty font parameter |
| // indicates a successfully loaded web font |
| FontsUpdated(context.Context) (css.FontsUpdatedClient, error) |
| |
| // Event MediaQueryResultChanged |
| // |
| // Fires whenever a MediaQuery result changes (for example, after a |
| // browser window has been resized.) The current implementation |
| // considers only viewport-dependent media features. |
| MediaQueryResultChanged(context.Context) (css.MediaQueryResultChangedClient, error) |
| |
| // Event StyleSheetAdded |
| // |
| // Fired whenever an active document stylesheet is added. |
| StyleSheetAdded(context.Context) (css.StyleSheetAddedClient, error) |
| |
| // Event StyleSheetChanged |
| // |
| // Fired whenever a stylesheet is changed as a result of the client |
| // operation. |
| StyleSheetChanged(context.Context) (css.StyleSheetChangedClient, error) |
| |
| // Event StyleSheetRemoved |
| // |
| // Fired whenever an active document stylesheet is removed. |
| StyleSheetRemoved(context.Context) (css.StyleSheetRemovedClient, error) |
| } |
| |
| // The CacheStorage domain. |
| // |
| // Note: This domain is experimental. |
| type CacheStorage interface { |
| // Command DeleteCache |
| // |
| // Deletes a cache. |
| DeleteCache(context.Context, *cachestorage.DeleteCacheArgs) error |
| |
| // Command DeleteEntry |
| // |
| // Deletes a cache entry. |
| DeleteEntry(context.Context, *cachestorage.DeleteEntryArgs) error |
| |
| // Command RequestCacheNames |
| // |
| // Requests cache names. |
| RequestCacheNames(context.Context, *cachestorage.RequestCacheNamesArgs) (*cachestorage.RequestCacheNamesReply, error) |
| |
| // Command RequestCachedResponse |
| // |
| // Fetches cache entry. |
| RequestCachedResponse(context.Context, *cachestorage.RequestCachedResponseArgs) (*cachestorage.RequestCachedResponseReply, error) |
| |
| // Command RequestEntries |
| // |
| // Requests data from cache. |
| RequestEntries(context.Context, *cachestorage.RequestEntriesArgs) (*cachestorage.RequestEntriesReply, error) |
| } |
| |
| // The Cast domain. A domain for interacting with Cast, Presentation API, and |
| // Remote Playback API functionalities. |
| // |
| // Note: This domain is experimental. |
| type Cast interface { |
| // Command Enable |
| // |
| // Starts observing for sinks that can be used for tab mirroring, and |
| // if set, sinks compatible with |presentationUrl| as well. When sinks |
| // are found, a |sinksUpdated| event is fired. Also starts observing |
| // for issue messages. When an issue is added or removed, an |
| // |issueUpdated| event is fired. |
| Enable(context.Context, *cast.EnableArgs) error |
| |
| // Command Disable |
| // |
| // Stops observing for sinks and issues. |
| Disable(context.Context) error |
| |
| // Command SetSinkToUse |
| // |
| // Sets a sink to be used when the web page requests the browser to |
| // choose a sink via Presentation API, Remote Playback API, or Cast |
| // SDK. |
| SetSinkToUse(context.Context, *cast.SetSinkToUseArgs) error |
| |
| // Command StartTabMirroring |
| // |
| // Starts mirroring the tab to the sink. |
| StartTabMirroring(context.Context, *cast.StartTabMirroringArgs) error |
| |
| // Command StopCasting |
| // |
| // Stops the active Cast session on the sink. |
| StopCasting(context.Context, *cast.StopCastingArgs) error |
| |
| // Event SinksUpdated |
| // |
| // This is fired whenever the list of available sinks changes. A sink |
| // is a device or a software surface that you can cast to. |
| SinksUpdated(context.Context) (cast.SinksUpdatedClient, error) |
| |
| // Event IssueUpdated |
| // |
| // This is fired whenever the outstanding issue/error message changes. |
| // |issueMessage| is empty if there is no issue. |
| IssueUpdated(context.Context) (cast.IssueUpdatedClient, error) |
| } |
| |
| // The Console domain. |
| // |
| // Deprecated: This domain is deprecated - use Runtime or Log instead. |
| type Console interface { |
| // Command ClearMessages |
| // |
| // Does nothing. |
| ClearMessages(context.Context) error |
| |
| // Command Disable |
| // |
| // Disables console domain, prevents further console messages from |
| // being reported to the client. |
| Disable(context.Context) error |
| |
| // Command Enable |
| // |
| // Enables console domain, sends the messages collected so far to the |
| // client by means of the `messageAdded` notification. |
| Enable(context.Context) error |
| |
| // Event MessageAdded |
| // |
| // Issued when new console message is added. |
| MessageAdded(context.Context) (console.MessageAddedClient, error) |
| } |
| |
| // The DOM domain. This domain exposes DOM read/write operations. Each DOM |
| // Node is represented with its mirror object that has an `id`. This `id` can |
| // be used to get additional information on the Node, resolve it into the |
| // JavaScript object wrapper, etc. It is important that client receives DOM |
| // events only for the nodes that are known to the client. Backend keeps track |
| // of the nodes that were sent to the client and never sends the same node |
| // twice. It is client's responsibility to collect information about the nodes |
| // that were sent to the client. |
| // |
| // Note that `iframe` owner elements will return corresponding document |
| // elements as their child nodes. |
| type DOM interface { |
| // Command CollectClassNamesFromSubtree |
| // |
| // Collects class names for the node with given id and all of it's |
| // child nodes. |
| // |
| // Note: This command is experimental. |
| CollectClassNamesFromSubtree(context.Context, *dom.CollectClassNamesFromSubtreeArgs) (*dom.CollectClassNamesFromSubtreeReply, error) |
| |
| // Command CopyTo |
| // |
| // Creates a deep copy of the specified node and places it into the |
| // target container before the given anchor. |
| // |
| // Note: This command is experimental. |
| CopyTo(context.Context, *dom.CopyToArgs) (*dom.CopyToReply, error) |
| |
| // Command DescribeNode |
| // |
| // Describes node given its id, does not require domain to be enabled. |
| // Does not start tracking any objects, can be used for automation. |
| DescribeNode(context.Context, *dom.DescribeNodeArgs) (*dom.DescribeNodeReply, error) |
| |
| // Command ScrollIntoViewIfNeeded |
| // |
| // Scrolls the specified rect of the given node into view if not |
| // already visible. Note: exactly one between nodeId, backendNodeId and |
| // objectId should be passed to identify the node. |
| // |
| // Note: This command is experimental. |
| ScrollIntoViewIfNeeded(context.Context, *dom.ScrollIntoViewIfNeededArgs) error |
| |
| // Command Disable |
| // |
| // Disables DOM agent for the given page. |
| Disable(context.Context) error |
| |
| // Command DiscardSearchResults |
| // |
| // Discards search results from the session with the given id. |
| // `getSearchResults` should no longer be called for that search. |
| // |
| // Note: This command is experimental. |
| DiscardSearchResults(context.Context, *dom.DiscardSearchResultsArgs) error |
| |
| // Command Enable |
| // |
| // Enables DOM agent for the given page. |
| Enable(context.Context) error |
| |
| // Command Focus |
| // |
| // Focuses the given element. |
| Focus(context.Context, *dom.FocusArgs) error |
| |
| // Command GetAttributes |
| // |
| // Returns attributes for the specified node. |
| GetAttributes(context.Context, *dom.GetAttributesArgs) (*dom.GetAttributesReply, error) |
| |
| // Command GetBoxModel |
| // |
| // Returns boxes for the given node. |
| GetBoxModel(context.Context, *dom.GetBoxModelArgs) (*dom.GetBoxModelReply, error) |
| |
| // Command GetContentQuads |
| // |
| // Returns quads that describe node position on the page. This method |
| // might return multiple quads for inline nodes. |
| // |
| // Note: This command is experimental. |
| GetContentQuads(context.Context, *dom.GetContentQuadsArgs) (*dom.GetContentQuadsReply, error) |
| |
| // Command GetDocument |
| // |
| // Returns the root DOM node (and optionally the subtree) to the |
| // caller. |
| GetDocument(context.Context, *dom.GetDocumentArgs) (*dom.GetDocumentReply, error) |
| |
| // Command GetFlattenedDocument |
| // |
| // Returns the root DOM node (and optionally the subtree) to the |
| // caller. |
| GetFlattenedDocument(context.Context, *dom.GetFlattenedDocumentArgs) (*dom.GetFlattenedDocumentReply, error) |
| |
| // Command GetNodeForLocation |
| // |
| // Returns node id at given location. Depending on whether DOM domain |
| // is enabled, nodeId is either returned or not. |
| GetNodeForLocation(context.Context, *dom.GetNodeForLocationArgs) (*dom.GetNodeForLocationReply, error) |
| |
| // Command GetOuterHTML |
| // |
| // Returns node's HTML markup. |
| GetOuterHTML(context.Context, *dom.GetOuterHTMLArgs) (*dom.GetOuterHTMLReply, error) |
| |
| // Command GetRelayoutBoundary |
| // |
| // Returns the id of the nearest ancestor that is a relayout boundary. |
| // |
| // Note: This command is experimental. |
| GetRelayoutBoundary(context.Context, *dom.GetRelayoutBoundaryArgs) (*dom.GetRelayoutBoundaryReply, error) |
| |
| // Command GetSearchResults |
| // |
| // Returns search results from given `fromIndex` to given `toIndex` |
| // from the search with the given identifier. |
| // |
| // Note: This command is experimental. |
| GetSearchResults(context.Context, *dom.GetSearchResultsArgs) (*dom.GetSearchResultsReply, error) |
| |
| // Command MarkUndoableState |
| // |
| // Marks last undoable state. |
| // |
| // Note: This command is experimental. |
| MarkUndoableState(context.Context) error |
| |
| // Command MoveTo |
| // |
| // Moves node into the new container, places it before the given |
| // anchor. |
| MoveTo(context.Context, *dom.MoveToArgs) (*dom.MoveToReply, error) |
| |
| // Command PerformSearch |
| // |
| // Searches for a given string in the DOM tree. Use `getSearchResults` |
| // to access search results or `cancelSearch` to end this search |
| // session. |
| // |
| // Note: This command is experimental. |
| PerformSearch(context.Context, *dom.PerformSearchArgs) (*dom.PerformSearchReply, error) |
| |
| // Command PushNodeByPathToFrontend |
| // |
| // Requests that the node is sent to the caller given its path. // |
| // FIXME, use XPath |
| // |
| // Note: This command is experimental. |
| PushNodeByPathToFrontend(context.Context, *dom.PushNodeByPathToFrontendArgs) (*dom.PushNodeByPathToFrontendReply, error) |
| |
| // Command PushNodesByBackendIDsToFrontend |
| // |
| // Requests that a batch of nodes is sent to the caller given their |
| // backend node ids. |
| // |
| // Note: This command is experimental. |
| PushNodesByBackendIDsToFrontend(context.Context, *dom.PushNodesByBackendIDsToFrontendArgs) (*dom.PushNodesByBackendIDsToFrontendReply, error) |
| |
| // Command QuerySelector |
| // |
| // Executes `querySelector` on a given node. |
| QuerySelector(context.Context, *dom.QuerySelectorArgs) (*dom.QuerySelectorReply, error) |
| |
| // Command QuerySelectorAll |
| // |
| // Executes `querySelectorAll` on a given node. |
| QuerySelectorAll(context.Context, *dom.QuerySelectorAllArgs) (*dom.QuerySelectorAllReply, error) |
| |
| // Command Redo |
| // |
| // Re-does the last undone action. |
| // |
| // Note: This command is experimental. |
| Redo(context.Context) error |
| |
| // Command RemoveAttribute |
| // |
| // Removes attribute with given name from an element with given id. |
| RemoveAttribute(context.Context, *dom.RemoveAttributeArgs) error |
| |
| // Command RemoveNode |
| // |
| // Removes node with given id. |
| RemoveNode(context.Context, *dom.RemoveNodeArgs) error |
| |
| // Command RequestChildNodes |
| // |
| // Requests that children of the node with given id are returned to |
| // the caller in form of `setChildNodes` events where not only |
| // immediate children are retrieved, but all children down to the |
| // specified depth. |
| RequestChildNodes(context.Context, *dom.RequestChildNodesArgs) error |
| |
| // Command RequestNode |
| // |
| // Requests that the node is sent to the caller given the JavaScript |
| // node object reference. All nodes that form the path from the node to |
| // the root are also sent to the client as a series of `setChildNodes` |
| // notifications. |
| RequestNode(context.Context, *dom.RequestNodeArgs) (*dom.RequestNodeReply, error) |
| |
| // Command ResolveNode |
| // |
| // Resolves the JavaScript node object for a given NodeId or |
| // BackendNodeId. |
| ResolveNode(context.Context, *dom.ResolveNodeArgs) (*dom.ResolveNodeReply, error) |
| |
| // Command SetAttributeValue |
| // |
| // Sets attribute for an element with given id. |
| SetAttributeValue(context.Context, *dom.SetAttributeValueArgs) error |
| |
| // Command SetAttributesAsText |
| // |
| // Sets attributes on element with given id. This method is useful |
| // when user edits some existing attribute value and types in several |
| // attribute name/value pairs. |
| SetAttributesAsText(context.Context, *dom.SetAttributesAsTextArgs) error |
| |
| // Command SetFileInputFiles |
| // |
| // Sets files for the given file input element. |
| SetFileInputFiles(context.Context, *dom.SetFileInputFilesArgs) error |
| |
| // Command SetNodeStackTracesEnabled |
| // |
| // Sets if stack traces should be captured for Nodes. See |
| // `Node.getNodeStackTraces`. Default is disabled. |
| // |
| // Note: This command is experimental. |
| SetNodeStackTracesEnabled(context.Context, *dom.SetNodeStackTracesEnabledArgs) error |
| |
| // Command GetNodeStackTraces |
| // |
| // Gets stack traces associated with a Node. As of now, only provides |
| // stack trace for Node creation. |
| // |
| // Note: This command is experimental. |
| GetNodeStackTraces(context.Context, *dom.GetNodeStackTracesArgs) (*dom.GetNodeStackTracesReply, error) |
| |
| // Command GetFileInfo |
| // |
| // Returns file information for the given File wrapper. |
| // |
| // Note: This command is experimental. |
| GetFileInfo(context.Context, *dom.GetFileInfoArgs) (*dom.GetFileInfoReply, error) |
| |
| // Command SetInspectedNode |
| // |
| // Enables console to refer to the node with given id via $x (see |
| // Command Line API for more details $x functions). |
| // |
| // Note: This command is experimental. |
| SetInspectedNode(context.Context, *dom.SetInspectedNodeArgs) error |
| |
| // Command SetNodeName |
| // |
| // Sets node name for a node with given id. |
| SetNodeName(context.Context, *dom.SetNodeNameArgs) (*dom.SetNodeNameReply, error) |
| |
| // Command SetNodeValue |
| // |
| // Sets node value for a node with given id. |
| SetNodeValue(context.Context, *dom.SetNodeValueArgs) error |
| |
| // Command SetOuterHTML |
| // |
| // Sets node HTML markup, returns new node id. |
| SetOuterHTML(context.Context, *dom.SetOuterHTMLArgs) error |
| |
| // Command Undo |
| // |
| // Undoes the last performed action. |
| // |
| // Note: This command is experimental. |
| Undo(context.Context) error |
| |
| // Command GetFrameOwner |
| // |
| // Returns iframe node that owns iframe with the given domain. |
| // |
| // Note: This command is experimental. |
| GetFrameOwner(context.Context, *dom.GetFrameOwnerArgs) (*dom.GetFrameOwnerReply, error) |
| |
| // Event AttributeModified |
| // |
| // Fired when `Element`'s attribute is modified. |
| AttributeModified(context.Context) (dom.AttributeModifiedClient, error) |
| |
| // Event AttributeRemoved |
| // |
| // Fired when `Element`'s attribute is removed. |
| AttributeRemoved(context.Context) (dom.AttributeRemovedClient, error) |
| |
| // Event CharacterDataModified |
| // |
| // Mirrors `DOMCharacterDataModified` event. |
| CharacterDataModified(context.Context) (dom.CharacterDataModifiedClient, error) |
| |
| // Event ChildNodeCountUpdated |
| // |
| // Fired when `Container`'s child node count has changed. |
| ChildNodeCountUpdated(context.Context) (dom.ChildNodeCountUpdatedClient, error) |
| |
| // Event ChildNodeInserted |
| // |
| // Mirrors `DOMNodeInserted` event. |
| ChildNodeInserted(context.Context) (dom.ChildNodeInsertedClient, error) |
| |
| // Event ChildNodeRemoved |
| // |
| // Mirrors `DOMNodeRemoved` event. |
| ChildNodeRemoved(context.Context) (dom.ChildNodeRemovedClient, error) |
| |
| // Event DistributedNodesUpdated |
| // |
| // Called when distribution is changed. |
| // |
| // Note: This event is experimental. |
| DistributedNodesUpdated(context.Context) (dom.DistributedNodesUpdatedClient, error) |
| |
| // Event DocumentUpdated |
| // |
| // Fired when `Document` has been totally updated. Node ids are no |
| // longer valid. |
| DocumentUpdated(context.Context) (dom.DocumentUpdatedClient, error) |
| |
| // Event InlineStyleInvalidated |
| // |
| // Fired when `Element`'s inline style is modified via a CSS property |
| // modification. |
| // |
| // Note: This event is experimental. |
| InlineStyleInvalidated(context.Context) (dom.InlineStyleInvalidatedClient, error) |
| |
| // Event PseudoElementAdded |
| // |
| // Called when a pseudo element is added to an element. |
| // |
| // Note: This event is experimental. |
| PseudoElementAdded(context.Context) (dom.PseudoElementAddedClient, error) |
| |
| // Event PseudoElementRemoved |
| // |
| // Called when a pseudo element is removed from an element. |
| // |
| // Note: This event is experimental. |
| PseudoElementRemoved(context.Context) (dom.PseudoElementRemovedClient, error) |
| |
| // Event SetChildNodes |
| // |
| // Fired when backend wants to provide client with the missing DOM |
| // structure. This happens upon most of the calls requesting node ids. |
| SetChildNodes(context.Context) (dom.SetChildNodesClient, error) |
| |
| // Event ShadowRootPopped |
| // |
| // Called when shadow root is popped from the element. |
| // |
| // Note: This event is experimental. |
| ShadowRootPopped(context.Context) (dom.ShadowRootPoppedClient, error) |
| |
| // Event ShadowRootPushed |
| // |
| // Called when shadow root is pushed into the element. |
| // |
| // Note: This event is experimental. |
| ShadowRootPushed(context.Context) (dom.ShadowRootPushedClient, error) |
| } |
| |
| // The DOMDebugger domain. DOM debugging allows setting breakpoints on |
| // particular DOM operations and events. JavaScript execution will stop on |
| // these operations as if there was a regular breakpoint set. |
| type DOMDebugger interface { |
| // Command GetEventListeners |
| // |
| // Returns event listeners of the given object. |
| GetEventListeners(context.Context, *domdebugger.GetEventListenersArgs) (*domdebugger.GetEventListenersReply, error) |
| |
| // Command RemoveDOMBreakpoint |
| // |
| // Removes DOM breakpoint that was set using `setDOMBreakpoint`. |
| RemoveDOMBreakpoint(context.Context, *domdebugger.RemoveDOMBreakpointArgs) error |
| |
| // Command RemoveEventListenerBreakpoint |
| // |
| // Removes breakpoint on particular DOM event. |
| RemoveEventListenerBreakpoint(context.Context, *domdebugger.RemoveEventListenerBreakpointArgs) error |
| |
| // Command RemoveInstrumentationBreakpoint |
| // |
| // Removes breakpoint on particular native event. |
| // |
| // Note: This command is experimental. |
| RemoveInstrumentationBreakpoint(context.Context, *domdebugger.RemoveInstrumentationBreakpointArgs) error |
| |
| // Command RemoveXHRBreakpoint |
| // |
| // Removes breakpoint from XMLHttpRequest. |
| RemoveXHRBreakpoint(context.Context, *domdebugger.RemoveXHRBreakpointArgs) error |
| |
| // Command SetDOMBreakpoint |
| // |
| // Sets breakpoint on particular operation with DOM. |
| SetDOMBreakpoint(context.Context, *domdebugger.SetDOMBreakpointArgs) error |
| |
| // Command SetEventListenerBreakpoint |
| // |
| // Sets breakpoint on particular DOM event. |
| SetEventListenerBreakpoint(context.Context, *domdebugger.SetEventListenerBreakpointArgs) error |
| |
| // Command SetInstrumentationBreakpoint |
| // |
| // Sets breakpoint on particular native event. |
| // |
| // Note: This command is experimental. |
| SetInstrumentationBreakpoint(context.Context, *domdebugger.SetInstrumentationBreakpointArgs) error |
| |
| // Command SetXHRBreakpoint |
| // |
| // Sets breakpoint on XMLHttpRequest. |
| SetXHRBreakpoint(context.Context, *domdebugger.SetXHRBreakpointArgs) error |
| } |
| |
| // The DOMSnapshot domain. This domain facilitates obtaining document |
| // snapshots with DOM, layout, and style information. |
| // |
| // Note: This domain is experimental. |
| type DOMSnapshot interface { |
| // Command Disable |
| // |
| // Disables DOM snapshot agent for the given page. |
| Disable(context.Context) error |
| |
| // Command Enable |
| // |
| // Enables DOM snapshot agent for the given page. |
| Enable(context.Context) error |
| |
| // Command GetSnapshot |
| // |
| // Deprecated: Returns a document snapshot, including the full DOM |
| // tree of the root node (including iframes, template contents, and |
| // imported documents) in a flattened array, as well as layout and |
| // white-listed computed style information for the nodes. Shadow DOM in |
| // the returned DOM tree is flattened. |
| GetSnapshot(context.Context, *domsnapshot.GetSnapshotArgs) (*domsnapshot.GetSnapshotReply, error) |
| |
| // Command CaptureSnapshot |
| // |
| // Returns a document snapshot, including the full DOM tree of the |
| // root node (including iframes, template contents, and imported |
| // documents) in a flattened array, as well as layout and white-listed |
| // computed style information for the nodes. Shadow DOM in the returned |
| // DOM tree is flattened. |
| CaptureSnapshot(context.Context, *domsnapshot.CaptureSnapshotArgs) (*domsnapshot.CaptureSnapshotReply, error) |
| } |
| |
| // The DOMStorage domain. Query and modify DOM storage. |
| // |
| // Note: This domain is experimental. |
| type DOMStorage interface { |
| // Command Clear |
| Clear(context.Context, *domstorage.ClearArgs) error |
| |
| // Command Disable |
| // |
| // Disables storage tracking, prevents storage events from being sent |
| // to the client. |
| Disable(context.Context) error |
| |
| // Command Enable |
| // |
| // Enables storage tracking, storage events will now be delivered to |
| // the client. |
| Enable(context.Context) error |
| |
| // Command GetDOMStorageItems |
| GetDOMStorageItems(context.Context, *domstorage.GetDOMStorageItemsArgs) (*domstorage.GetDOMStorageItemsReply, error) |
| |
| // Command RemoveDOMStorageItem |
| RemoveDOMStorageItem(context.Context, *domstorage.RemoveDOMStorageItemArgs) error |
| |
| // Command SetDOMStorageItem |
| SetDOMStorageItem(context.Context, *domstorage.SetDOMStorageItemArgs) error |
| |
| // Event DOMStorageItemAdded |
| DOMStorageItemAdded(context.Context) (domstorage.ItemAddedClient, error) |
| |
| // Event DOMStorageItemRemoved |
| DOMStorageItemRemoved(context.Context) (domstorage.ItemRemovedClient, error) |
| |
| // Event DOMStorageItemUpdated |
| DOMStorageItemUpdated(context.Context) (domstorage.ItemUpdatedClient, error) |
| |
| // Event DOMStorageItemsCleared |
| DOMStorageItemsCleared(context.Context) (domstorage.ItemsClearedClient, error) |
| } |
| |
| // The Database domain. |
| // |
| // Note: This domain is experimental. |
| type Database interface { |
| // Command Disable |
| // |
| // Disables database tracking, prevents database events from being |
| // sent to the client. |
| Disable(context.Context) error |
| |
| // Command Enable |
| // |
| // Enables database tracking, database events will now be delivered to |
| // the client. |
| Enable(context.Context) error |
| |
| // Command ExecuteSQL |
| ExecuteSQL(context.Context, *database.ExecuteSQLArgs) (*database.ExecuteSQLReply, error) |
| |
| // Command GetDatabaseTableNames |
| GetDatabaseTableNames(context.Context, *database.GetDatabaseTableNamesArgs) (*database.GetDatabaseTableNamesReply, error) |
| |
| // Event AddDatabase |
| AddDatabase(context.Context) (database.AddDatabaseClient, error) |
| } |
| |
| // The Debugger domain. Debugger domain exposes JavaScript debugging |
| // capabilities. It allows setting and removing breakpoints, stepping through |
| // execution, exploring stack traces, etc. |
| type Debugger interface { |
| // Command ContinueToLocation |
| // |
| // Continues execution until specific location is reached. |
| ContinueToLocation(context.Context, *debugger.ContinueToLocationArgs) error |
| |
| // Command Disable |
| // |
| // Disables debugger for given page. |
| Disable(context.Context) error |
| |
| // Command Enable |
| // |
| // Enables debugger for the given page. Clients should not assume that |
| // the debugging has been enabled until the result for this command is |
| // received. |
| Enable(context.Context, *debugger.EnableArgs) (*debugger.EnableReply, error) |
| |
| // Command EvaluateOnCallFrame |
| // |
| // Evaluates expression on a given call frame. |
| EvaluateOnCallFrame(context.Context, *debugger.EvaluateOnCallFrameArgs) (*debugger.EvaluateOnCallFrameReply, error) |
| |
| // Command ExecuteWasmEvaluator |
| // |
| // Execute a Wasm Evaluator module on a given call frame. |
| // |
| // Note: This command is experimental. |
| ExecuteWasmEvaluator(context.Context, *debugger.ExecuteWasmEvaluatorArgs) (*debugger.ExecuteWasmEvaluatorReply, error) |
| |
| // Command GetPossibleBreakpoints |
| // |
| // Returns possible locations for breakpoint. scriptId in start and |
| // end range locations should be the same. |
| GetPossibleBreakpoints(context.Context, *debugger.GetPossibleBreakpointsArgs) (*debugger.GetPossibleBreakpointsReply, error) |
| |
| // Command GetScriptSource |
| // |
| // Returns source for the script with given id. |
| GetScriptSource(context.Context, *debugger.GetScriptSourceArgs) (*debugger.GetScriptSourceReply, error) |
| |
| // Command GetWasmBytecode |
| // |
| // Deprecated: This command is deprecated. Use getScriptSource |
| // instead. |
| GetWasmBytecode(context.Context, *debugger.GetWasmBytecodeArgs) (*debugger.GetWasmBytecodeReply, error) |
| |
| // Command GetStackTrace |
| // |
| // Returns stack trace with given `stackTraceId`. |
| // |
| // Note: This command is experimental. |
| GetStackTrace(context.Context, *debugger.GetStackTraceArgs) (*debugger.GetStackTraceReply, error) |
| |
| // Command Pause |
| // |
| // Stops on the next JavaScript statement. |
| Pause(context.Context) error |
| |
| // Command PauseOnAsyncCall |
| // |
| // Deprecated: This command is deprecated. |
| // |
| // Note: This command is experimental. |
| PauseOnAsyncCall(context.Context, *debugger.PauseOnAsyncCallArgs) error |
| |
| // Command RemoveBreakpoint |
| // |
| // Removes JavaScript breakpoint. |
| RemoveBreakpoint(context.Context, *debugger.RemoveBreakpointArgs) error |
| |
| // Command RestartFrame |
| // |
| // Restarts particular call frame from the beginning. |
| RestartFrame(context.Context, *debugger.RestartFrameArgs) (*debugger.RestartFrameReply, error) |
| |
| // Command Resume |
| // |
| // Resumes JavaScript execution. |
| Resume(context.Context, *debugger.ResumeArgs) error |
| |
| // Command SearchInContent |
| // |
| // Searches for given string in script content. |
| SearchInContent(context.Context, *debugger.SearchInContentArgs) (*debugger.SearchInContentReply, error) |
| |
| // Command SetAsyncCallStackDepth |
| // |
| // Enables or disables async call stacks tracking. |
| SetAsyncCallStackDepth(context.Context, *debugger.SetAsyncCallStackDepthArgs) error |
| |
| // Command SetBlackboxPatterns |
| // |
| // Replace previous blackbox patterns with passed ones. Forces backend |
| // to skip stepping/pausing in scripts with url matching one of the |
| // patterns. VM will try to leave blackboxed script by performing 'step |
| // in' several times, finally resorting to 'step out' if unsuccessful. |
| // |
| // Note: This command is experimental. |
| SetBlackboxPatterns(context.Context, *debugger.SetBlackboxPatternsArgs) error |
| |
| // Command SetBlackboxedRanges |
| // |
| // Makes backend skip steps in the script in blackboxed ranges. VM |
| // will try leave blacklisted scripts by performing 'step in' several |
| // times, finally resorting to 'step out' if unsuccessful. Positions |
| // array contains positions where blackbox state is changed. First |
| // interval isn't blackboxed. Array should be sorted. |
| // |
| // Note: This command is experimental. |
| SetBlackboxedRanges(context.Context, *debugger.SetBlackboxedRangesArgs) error |
| |
| // Command SetBreakpoint |
| // |
| // Sets JavaScript breakpoint at a given location. |
| SetBreakpoint(context.Context, *debugger.SetBreakpointArgs) (*debugger.SetBreakpointReply, error) |
| |
| // Command SetInstrumentationBreakpoint |
| // |
| // Sets instrumentation breakpoint. |
| SetInstrumentationBreakpoint(context.Context, *debugger.SetInstrumentationBreakpointArgs) (*debugger.SetInstrumentationBreakpointReply, error) |
| |
| // Command SetBreakpointByURL |
| // |
| // Sets JavaScript breakpoint at given location specified either by |
| // URL or URL regex. Once this command is issued, all existing parsed |
| // scripts will have breakpoints resolved and returned in `locations` |
| // property. Further matching script parsing will result in subsequent |
| // `breakpointResolved` events issued. This logical breakpoint will |
| // survive page reloads. |
| SetBreakpointByURL(context.Context, *debugger.SetBreakpointByURLArgs) (*debugger.SetBreakpointByURLReply, error) |
| |
| // Command SetBreakpointOnFunctionCall |
| // |
| // Sets JavaScript breakpoint before each call to the given function. |
| // If another function was created from the same source as a given one, |
| // calling it will also trigger the breakpoint. |
| // |
| // Note: This command is experimental. |
| SetBreakpointOnFunctionCall(context.Context, *debugger.SetBreakpointOnFunctionCallArgs) (*debugger.SetBreakpointOnFunctionCallReply, error) |
| |
| // Command SetBreakpointsActive |
| // |
| // Activates / deactivates all breakpoints on the page. |
| SetBreakpointsActive(context.Context, *debugger.SetBreakpointsActiveArgs) error |
| |
| // Command SetPauseOnExceptions |
| // |
| // Defines pause on exceptions state. Can be set to stop on all |
| // exceptions, uncaught exceptions or no exceptions. Initial pause on |
| // exceptions state is `none`. |
| SetPauseOnExceptions(context.Context, *debugger.SetPauseOnExceptionsArgs) error |
| |
| // Command SetReturnValue |
| // |
| // Changes return value in top frame. Available only at return break |
| // position. |
| // |
| // Note: This command is experimental. |
| SetReturnValue(context.Context, *debugger.SetReturnValueArgs) error |
| |
| // Command SetScriptSource |
| // |
| // Edits JavaScript source live. |
| SetScriptSource(context.Context, *debugger.SetScriptSourceArgs) (*debugger.SetScriptSourceReply, error) |
| |
| // Command SetSkipAllPauses |
| // |
| // Makes page not interrupt on any pauses (breakpoint, exception, dom |
| // exception etc). |
| SetSkipAllPauses(context.Context, *debugger.SetSkipAllPausesArgs) error |
| |
| // Command SetVariableValue |
| // |
| // Changes value of variable in a callframe. Object-based scopes are |
| // not supported and must be mutated manually. |
| SetVariableValue(context.Context, *debugger.SetVariableValueArgs) error |
| |
| // Command StepInto |
| // |
| // Steps into the function call. |
| StepInto(context.Context, *debugger.StepIntoArgs) error |
| |
| // Command StepOut |
| // |
| // Steps out of the function call. |
| StepOut(context.Context) error |
| |
| // Command StepOver |
| // |
| // Steps over the statement. |
| StepOver(context.Context) error |
| |
| // Event BreakpointResolved |
| // |
| // Fired when breakpoint is resolved to an actual script and location. |
| BreakpointResolved(context.Context) (debugger.BreakpointResolvedClient, error) |
| |
| // Event Paused |
| // |
| // Fired when the virtual machine stopped on breakpoint or exception |
| // or any other stop criteria. |
| Paused(context.Context) (debugger.PausedClient, error) |
| |
| // Event Resumed |
| // |
| // Fired when the virtual machine resumed execution. |
| Resumed(context.Context) (debugger.ResumedClient, error) |
| |
| // Event ScriptFailedToParse |
| // |
| // Fired when virtual machine fails to parse the script. |
| ScriptFailedToParse(context.Context) (debugger.ScriptFailedToParseClient, error) |
| |
| // Event ScriptParsed |
| // |
| // Fired when virtual machine parses script. This event is also fired |
| // for all known and uncollected scripts upon enabling debugger. |
| ScriptParsed(context.Context) (debugger.ScriptParsedClient, error) |
| } |
| |
| // The DeviceOrientation domain. |
| // |
| // Note: This domain is experimental. |
| type DeviceOrientation interface { |
| // Command ClearDeviceOrientationOverride |
| // |
| // Clears the overridden Device Orientation. |
| ClearDeviceOrientationOverride(context.Context) error |
| |
| // Command SetDeviceOrientationOverride |
| // |
| // Overrides the Device Orientation. |
| SetDeviceOrientationOverride(context.Context, *deviceorientation.SetDeviceOrientationOverrideArgs) error |
| } |
| |
| // The Emulation domain. This domain emulates different environments for the |
| // page. |
| type Emulation interface { |
| // Command CanEmulate |
| // |
| // Tells whether emulation is supported. |
| CanEmulate(context.Context) (*emulation.CanEmulateReply, error) |
| |
| // Command ClearDeviceMetricsOverride |
| // |
| // Clears the overridden device metrics. |
| ClearDeviceMetricsOverride(context.Context) error |
| |
| // Command ClearGeolocationOverride |
| // |
| // Clears the overridden Geolocation Position and Error. |
| ClearGeolocationOverride(context.Context) error |
| |
| // Command ResetPageScaleFactor |
| // |
| // Requests that page scale factor is reset to initial values. |
| // |
| // Note: This command is experimental. |
| ResetPageScaleFactor(context.Context) error |
| |
| // Command SetFocusEmulationEnabled |
| // |
| // Enables or disables simulating a focused and active page. |
| // |
| // Note: This command is experimental. |
| SetFocusEmulationEnabled(context.Context, *emulation.SetFocusEmulationEnabledArgs) error |
| |
| // Command SetCPUThrottlingRate |
| // |
| // Enables CPU throttling to emulate slow CPUs. |
| // |
| // Note: This command is experimental. |
| SetCPUThrottlingRate(context.Context, *emulation.SetCPUThrottlingRateArgs) error |
| |
| // Command SetDefaultBackgroundColorOverride |
| // |
| // Sets or clears an override of the default background color of the |
| // frame. This override is used if the content does not specify one. |
| SetDefaultBackgroundColorOverride(context.Context, *emulation.SetDefaultBackgroundColorOverrideArgs) error |
| |
| // Command SetDeviceMetricsOverride |
| // |
| // Overrides the values of device screen dimensions |
| // (window.screen.width, window.screen.height, window.innerWidth, |
| // window.innerHeight, and "device-width"/"device-height"-related CSS |
| // media query results). |
| SetDeviceMetricsOverride(context.Context, *emulation.SetDeviceMetricsOverrideArgs) error |
| |
| // Command SetScrollbarsHidden |
| // |
| // Note: This command is experimental. |
| SetScrollbarsHidden(context.Context, *emulation.SetScrollbarsHiddenArgs) error |
| |
| // Command SetDocumentCookieDisabled |
| // |
| // Note: This command is experimental. |
| SetDocumentCookieDisabled(context.Context, *emulation.SetDocumentCookieDisabledArgs) error |
| |
| // Command SetEmitTouchEventsForMouse |
| // |
| // Note: This command is experimental. |
| SetEmitTouchEventsForMouse(context.Context, *emulation.SetEmitTouchEventsForMouseArgs) error |
| |
| // Command SetEmulatedMedia |
| // |
| // Emulates the given media type or media feature for CSS media |
| // queries. |
| SetEmulatedMedia(context.Context, *emulation.SetEmulatedMediaArgs) error |
| |
| // Command SetEmulatedVisionDeficiency |
| // |
| // Emulates the given vision deficiency. |
| // |
| // Note: This command is experimental. |
| SetEmulatedVisionDeficiency(context.Context, *emulation.SetEmulatedVisionDeficiencyArgs) error |
| |
| // Command SetGeolocationOverride |
| // |
| // Overrides the Geolocation Position or Error. Omitting any of the |
| // parameters emulates position unavailable. |
| SetGeolocationOverride(context.Context, *emulation.SetGeolocationOverrideArgs) error |
| |
| // Command SetNavigatorOverrides |
| // |
| // Deprecated: Overrides value returned by the javascript navigator |
| // object. |
| // |
| // Note: This command is experimental. |
| SetNavigatorOverrides(context.Context, *emulation.SetNavigatorOverridesArgs) error |
| |
| // Command SetPageScaleFactor |
| // |
| // Sets a specified page scale factor. |
| // |
| // Note: This command is experimental. |
| SetPageScaleFactor(context.Context, *emulation.SetPageScaleFactorArgs) error |
| |
| // Command SetScriptExecutionDisabled |
| // |
| // Switches script execution in the page. |
| SetScriptExecutionDisabled(context.Context, *emulation.SetScriptExecutionDisabledArgs) error |
| |
| // Command SetTouchEmulationEnabled |
| // |
| // Enables touch on platforms which do not support them. |
| SetTouchEmulationEnabled(context.Context, *emulation.SetTouchEmulationEnabledArgs) error |
| |
| // Command SetVirtualTimePolicy |
| // |
| // Turns on virtual time for all frames (replacing real-time with a |
| // synthetic time source) and sets the current virtual time policy. |
| // Note this supersedes any previous time budget. |
| // |
| // Note: This command is experimental. |
| SetVirtualTimePolicy(context.Context, *emulation.SetVirtualTimePolicyArgs) (*emulation.SetVirtualTimePolicyReply, error) |
| |
| // Command SetLocaleOverride |
| // |
| // Overrides default host system locale with the specified one. |
| // |
| // Note: This command is experimental. |
| SetLocaleOverride(context.Context, *emulation.SetLocaleOverrideArgs) error |
| |
| // Command SetTimezoneOverride |
| // |
| // Overrides default host system timezone with the specified one. |
| // |
| // Note: This command is experimental. |
| SetTimezoneOverride(context.Context, *emulation.SetTimezoneOverrideArgs) error |
| |
| // Command SetVisibleSize |
| // |
| // Deprecated: Resizes the frame/viewport of the page. Note that this |
| // does not affect the frame's container (e.g. browser window). Can be |
| // used to produce screenshots of the specified size. Not supported on |
| // Android. |
| // |
| // Note: This command is experimental. |
| SetVisibleSize(context.Context, *emulation.SetVisibleSizeArgs) error |
| |
| // Command SetUserAgentOverride |
| // |
| // Allows overriding user agent with the given string. |
| SetUserAgentOverride(context.Context, *emulation.SetUserAgentOverrideArgs) error |
| |
| // Event VirtualTimeBudgetExpired |
| // |
| // Notification sent after the virtual time budget for the current |
| // VirtualTimePolicy has run out. |
| // |
| // Note: This event is experimental. |
| VirtualTimeBudgetExpired(context.Context) (emulation.VirtualTimeBudgetExpiredClient, error) |
| } |
| |
| // The Fetch domain. A domain for letting clients substitute browser's network |
| // layer with client code. |
| // |
| // Note: This domain is experimental. |
| type Fetch interface { |
| // Command Disable |
| // |
| // Disables the fetch domain. |
| Disable(context.Context) error |
| |
| // Command Enable |
| // |
| // Enables issuing of requestPaused events. A request will be paused |
| // until client calls one of failRequest, fulfillRequest or |
| // continueRequest/continueWithAuth. |
| Enable(context.Context, *fetch.EnableArgs) error |
| |
| // Command FailRequest |
| // |
| // Causes the request to fail with specified reason. |
| FailRequest(context.Context, *fetch.FailRequestArgs) error |
| |
| // Command FulfillRequest |
| // |
| // Provides response to the request. |
| FulfillRequest(context.Context, *fetch.FulfillRequestArgs) error |
| |
| // Command ContinueRequest |
| // |
| // Continues the request, optionally modifying some of its parameters. |
| ContinueRequest(context.Context, *fetch.ContinueRequestArgs) error |
| |
| // Command ContinueWithAuth |
| // |
| // Continues a request supplying authChallengeResponse following |
| // authRequired event. |
| ContinueWithAuth(context.Context, *fetch.ContinueWithAuthArgs) error |
| |
| // Command GetResponseBody |
| // |
| // Causes the body of the response to be received from the server and |
| // returned as a single string. May only be issued for a request that |
| // is paused in the Response stage and is mutually exclusive with |
| // takeResponseBodyForInterceptionAsStream. Calling other methods that |
| // affect the request or disabling fetch domain before body is received |
| // results in an undefined behavior. |
| GetResponseBody(context.Context, *fetch.GetResponseBodyArgs) (*fetch.GetResponseBodyReply, error) |
| |
| // Command TakeResponseBodyAsStream |
| // |
| // Returns a handle to the stream representing the response body. The |
| // request must be paused in the HeadersReceived stage. Note that after |
| // this command the request can't be continued as is -- client either |
| // needs to cancel it or to provide the response body. The stream only |
| // supports sequential read, IO.read will fail if the position is |
| // specified. This method is mutually exclusive with getResponseBody. |
| // Calling other methods that affect the request or disabling fetch |
| // domain before body is received results in an undefined behavior. |
| TakeResponseBodyAsStream(context.Context, *fetch.TakeResponseBodyAsStreamArgs) (*fetch.TakeResponseBodyAsStreamReply, error) |
| |
| // Event RequestPaused |
| // |
| // Issued when the domain is enabled and the request URL matches the |
| // specified filter. The request is paused until the client responds |
| // with one of continueRequest, failRequest or fulfillRequest. The |
| // stage of the request can be determined by presence of |
| // responseErrorReason and responseStatusCode -- the request is at the |
| // response stage if either of these fields is present and in the |
| // request stage otherwise. |
| RequestPaused(context.Context) (fetch.RequestPausedClient, error) |
| |
| // Event AuthRequired |
| // |
| // Issued when the domain is enabled with handleAuthRequests set to |
| // true. The request is paused until client responds with |
| // continueWithAuth. |
| AuthRequired(context.Context) (fetch.AuthRequiredClient, error) |
| } |
| |
| // The HeadlessExperimental domain. This domain provides experimental commands |
| // only supported in headless mode. |
| // |
| // Note: This domain is experimental. |
| type HeadlessExperimental interface { |
| // Command BeginFrame |
| // |
| // Sends a BeginFrame to the target and returns when the frame was |
| // completed. Optionally captures a screenshot from the resulting |
| // frame. Requires that the target was created with enabled |
| // BeginFrameControl. Designed for use with |
| // --run-all-compositor-stages-before-draw, see also |
| // https://goo.gl/3zHXhB for more background. |
| BeginFrame(context.Context, *headlessexperimental.BeginFrameArgs) (*headlessexperimental.BeginFrameReply, error) |
| |
| // Command Disable |
| // |
| // Disables headless events for the target. |
| Disable(context.Context) error |
| |
| // Command Enable |
| // |
| // Enables headless events for the target. |
| Enable(context.Context) error |
| |
| // Event NeedsBeginFramesChanged |
| // |
| // Deprecated: Issued when the target starts or stops needing |
| // BeginFrames. Deprecated. Issue beginFrame unconditionally instead |
| // and use result from beginFrame to detect whether the frames were |
| // suppressed. |
| NeedsBeginFramesChanged(context.Context) (headlessexperimental.NeedsBeginFramesChangedClient, error) |
| } |
| |
| // The HeapProfiler domain. |
| // |
| // Note: This domain is experimental. |
| type HeapProfiler interface { |
| // Command AddInspectedHeapObject |
| // |
| // Enables console to refer to the node with given id via $x (see |
| // Command Line API for more details $x functions). |
| AddInspectedHeapObject(context.Context, *heapprofiler.AddInspectedHeapObjectArgs) error |
| |
| // Command CollectGarbage |
| CollectGarbage(context.Context) error |
| |
| // Command Disable |
| Disable(context.Context) error |
| |
| // Command Enable |
| Enable(context.Context) error |
| |
| // Command GetHeapObjectID |
| GetHeapObjectID(context.Context, *heapprofiler.GetHeapObjectIDArgs) (*heapprofiler.GetHeapObjectIDReply, error) |
| |
| // Command GetObjectByHeapObjectID |
| GetObjectByHeapObjectID(context.Context, *heapprofiler.GetObjectByHeapObjectIDArgs) (*heapprofiler.GetObjectByHeapObjectIDReply, error) |
| |
| // Command GetSamplingProfile |
| GetSamplingProfile(context.Context) (*heapprofiler.GetSamplingProfileReply, error) |
| |
| // Command StartSampling |
| StartSampling(context.Context, *heapprofiler.StartSamplingArgs) error |
| |
| // Command StartTrackingHeapObjects |
| StartTrackingHeapObjects(context.Context, *heapprofiler.StartTrackingHeapObjectsArgs) error |
| |
| // Command StopSampling |
| StopSampling(context.Context) (*heapprofiler.StopSamplingReply, error) |
| |
| // Command StopTrackingHeapObjects |
| StopTrackingHeapObjects(context.Context, *heapprofiler.StopTrackingHeapObjectsArgs) error |
| |
| // Command TakeHeapSnapshot |
| TakeHeapSnapshot(context.Context, *heapprofiler.TakeHeapSnapshotArgs) error |
| |
| // Event AddHeapSnapshotChunk |
| AddHeapSnapshotChunk(context.Context) (heapprofiler.AddHeapSnapshotChunkClient, error) |
| |
| // Event HeapStatsUpdate |
| // |
| // If heap objects tracking has been started then backend may send |
| // update for one or more fragments |
| HeapStatsUpdate(context.Context) (heapprofiler.HeapStatsUpdateClient, error) |
| |
| // Event LastSeenObjectID |
| // |
| // If heap objects tracking has been started then backend regularly |
| // sends a current value for last seen object id and corresponding |
| // timestamp. If the were changes in the heap since last event then one |
| // or more heapStatsUpdate events will be sent before a new |
| // lastSeenObjectId event. |
| LastSeenObjectID(context.Context) (heapprofiler.LastSeenObjectIDClient, error) |
| |
| // Event ReportHeapSnapshotProgress |
| ReportHeapSnapshotProgress(context.Context) (heapprofiler.ReportHeapSnapshotProgressClient, error) |
| |
| // Event ResetProfiles |
| ResetProfiles(context.Context) (heapprofiler.ResetProfilesClient, error) |
| } |
| |
| // The IO domain. Input/Output operations for streams produced by DevTools. |
| type IO interface { |
| // Command Close |
| // |
| // Close the stream, discard any temporary backing storage. |
| Close(context.Context, *io.CloseArgs) error |
| |
| // Command Read |
| // |
| // Read a chunk of the stream |
| Read(context.Context, *io.ReadArgs) (*io.ReadReply, error) |
| |
| // Command ResolveBlob |
| // |
| // Return UUID of Blob object specified by a remote object id. |
| ResolveBlob(context.Context, *io.ResolveBlobArgs) (*io.ResolveBlobReply, error) |
| } |
| |
| // The IndexedDB domain. |
| // |
| // Note: This domain is experimental. |
| type IndexedDB interface { |
| // Command ClearObjectStore |
| // |
| // Clears all entries from an object store. |
| ClearObjectStore(context.Context, *indexeddb.ClearObjectStoreArgs) error |
| |
| // Command DeleteDatabase |
| // |
| // Deletes a database. |
| DeleteDatabase(context.Context, *indexeddb.DeleteDatabaseArgs) error |
| |
| // Command DeleteObjectStoreEntries |
| // |
| // Delete a range of entries from an object store |
| DeleteObjectStoreEntries(context.Context, *indexeddb.DeleteObjectStoreEntriesArgs) error |
| |
| // Command Disable |
| // |
| // Disables events from backend. |
| Disable(context.Context) error |
| |
| // Command Enable |
| // |
| // Enables events from backend. |
| Enable(context.Context) error |
| |
| // Command RequestData |
| // |
| // Requests data from object store or index. |
| RequestData(context.Context, *indexeddb.RequestDataArgs) (*indexeddb.RequestDataReply, error) |
| |
| // Command GetMetadata |
| // |
| // Gets metadata of an object store |
| GetMetadata(context.Context, *indexeddb.GetMetadataArgs) (*indexeddb.GetMetadataReply, error) |
| |
| // Command RequestDatabase |
| // |
| // Requests database with given name in given frame. |
| RequestDatabase(context.Context, *indexeddb.RequestDatabaseArgs) (*indexeddb.RequestDatabaseReply, error) |
| |
| // Command RequestDatabaseNames |
| // |
| // Requests database names for given security origin. |
| RequestDatabaseNames(context.Context, *indexeddb.RequestDatabaseNamesArgs) (*indexeddb.RequestDatabaseNamesReply, error) |
| } |
| |
| // The Input domain. |
| type Input interface { |
| // Command DispatchKeyEvent |
| // |
| // Dispatches a key event to the page. |
| DispatchKeyEvent(context.Context, *input.DispatchKeyEventArgs) error |
| |
| // Command InsertText |
| // |
| // This method emulates inserting text that doesn't come from a key |
| // press, for example an emoji keyboard or an IME. |
| // |
| // Note: This command is experimental. |
| InsertText(context.Context, *input.InsertTextArgs) error |
| |
| // Command DispatchMouseEvent |
| // |
| // Dispatches a mouse event to the page. |
| DispatchMouseEvent(context.Context, *input.DispatchMouseEventArgs) error |
| |
| // Command DispatchTouchEvent |
| // |
| // Dispatches a touch event to the page. |
| DispatchTouchEvent(context.Context, *input.DispatchTouchEventArgs) error |
| |
| // Command EmulateTouchFromMouseEvent |
| // |
| // Emulates touch event from the mouse event parameters. |
| // |
| // Note: This command is experimental. |
| EmulateTouchFromMouseEvent(context.Context, *input.EmulateTouchFromMouseEventArgs) error |
| |
| // Command SetIgnoreInputEvents |
| // |
| // Ignores input events (useful while auditing page). |
| SetIgnoreInputEvents(context.Context, *input.SetIgnoreInputEventsArgs) error |
| |
| // Command SynthesizePinchGesture |
| // |
| // Synthesizes a pinch gesture over a time period by issuing |
| // appropriate touch events. |
| // |
| // Note: This command is experimental. |
| SynthesizePinchGesture(context.Context, *input.SynthesizePinchGestureArgs) error |
| |
| // Command SynthesizeScrollGesture |
| // |
| // Synthesizes a scroll gesture over a time period by issuing |
| // appropriate touch events. |
| // |
| // Note: This command is experimental. |
| SynthesizeScrollGesture(context.Context, *input.SynthesizeScrollGestureArgs) error |
| |
| // Command SynthesizeTapGesture |
| // |
| // Synthesizes a tap gesture over a time period by issuing appropriate |
| // touch events. |
| // |
| // Note: This command is experimental. |
| SynthesizeTapGesture(context.Context, *input.SynthesizeTapGestureArgs) error |
| } |
| |
| // The Inspector domain. |
| // |
| // Note: This domain is experimental. |
| type Inspector interface { |
| // Command Disable |
| // |
| // Disables inspector domain notifications. |
| Disable(context.Context) error |
| |
| // Command Enable |
| // |
| // Enables inspector domain notifications. |
| Enable(context.Context) error |
| |
| // Event Detached |
| // |
| // Fired when remote debugging connection is about to be terminated. |
| // Contains detach reason. |
| Detached(context.Context) (inspector.DetachedClient, error) |
| |
| // Event TargetCrashed |
| // |
| // Fired when debugging target has crashed |
| TargetCrashed(context.Context) (inspector.TargetCrashedClient, error) |
| |
| // Event TargetReloadedAfterCrash |
| // |
| // Fired when debugging target has reloaded after crash |
| TargetReloadedAfterCrash(context.Context) (inspector.TargetReloadedAfterCrashClient, error) |
| } |
| |
| // The LayerTree domain. |
| // |
| // Note: This domain is experimental. |
| type LayerTree interface { |
| // Command CompositingReasons |
| // |
| // Provides the reasons why the given layer was composited. |
| CompositingReasons(context.Context, *layertree.CompositingReasonsArgs) (*layertree.CompositingReasonsReply, error) |
| |
| // Command Disable |
| // |
| // Disables compositing tree inspection. |
| Disable(context.Context) error |
| |
| // Command Enable |
| // |
| // Enables compositing tree inspection. |
| Enable(context.Context) error |
| |
| // Command LoadSnapshot |
| // |
| // Returns the snapshot identifier. |
| LoadSnapshot(context.Context, *layertree.LoadSnapshotArgs) (*layertree.LoadSnapshotReply, error) |
| |
| // Command MakeSnapshot |
| // |
| // Returns the layer snapshot identifier. |
| MakeSnapshot(context.Context, *layertree.MakeSnapshotArgs) (*layertree.MakeSnapshotReply, error) |
| |
| // Command ProfileSnapshot |
| ProfileSnapshot(context.Context, *layertree.ProfileSnapshotArgs) (*layertree.ProfileSnapshotReply, error) |
| |
| // Command ReleaseSnapshot |
| // |
| // Releases layer snapshot captured by the back-end. |
| ReleaseSnapshot(context.Context, *layertree.ReleaseSnapshotArgs) error |
| |
| // Command ReplaySnapshot |
| // |
| // Replays the layer snapshot and returns the resulting bitmap. |
| ReplaySnapshot(context.Context, *layertree.ReplaySnapshotArgs) (*layertree.ReplaySnapshotReply, error) |
| |
| // Command SnapshotCommandLog |
| // |
| // Replays the layer snapshot and returns canvas log. |
| SnapshotCommandLog(context.Context, *layertree.SnapshotCommandLogArgs) (*layertree.SnapshotCommandLogReply, error) |
| |
| // Event LayerPainted |
| LayerPainted(context.Context) (layertree.LayerPaintedClient, error) |
| |
| // Event LayerTreeDidChange |
| LayerTreeDidChange(context.Context) (layertree.DidChangeClient, error) |
| } |
| |
| // The Log domain. Provides access to log entries. |
| type Log interface { |
| // Command Clear |
| // |
| // Clears the log. |
| Clear(context.Context) error |
| |
| // Command Disable |
| // |
| // Disables log domain, prevents further log entries from being |
| // reported to the client. |
| Disable(context.Context) error |
| |
| // Command Enable |
| // |
| // Enables log domain, sends the entries collected so far to the |
| // client by means of the `entryAdded` notification. |
| Enable(context.Context) error |
| |
| // Command StartViolationsReport |
| // |
| // start violation reporting. |
| StartViolationsReport(context.Context, *log.StartViolationsReportArgs) error |
| |
| // Command StopViolationsReport |
| // |
| // Stop violation reporting. |
| StopViolationsReport(context.Context) error |
| |
| // Event EntryAdded |
| // |
| // Issued when new message was logged. |
| EntryAdded(context.Context) (log.EntryAddedClient, error) |
| } |
| |
| // The Media domain. This domain allows detailed inspection of media elements |
| // |
| // Note: This domain is experimental. |
| type Media interface { |
| // Command Enable |
| // |
| // Enables the Media domain |
| Enable(context.Context) error |
| |
| // Command Disable |
| // |
| // Disables the Media domain. |
| Disable(context.Context) error |
| |
| // Event PlayerPropertiesChanged |
| // |
| // This can be called multiple times, and can be used to set / |
| // override / remove player properties. A null propValue indicates |
| // removal. |
| PlayerPropertiesChanged(context.Context) (media.PlayerPropertiesChangedClient, error) |
| |
| // Event PlayerEventsAdded |
| // |
| // Send events as a list, allowing them to be batched on the browser |
| // for less congestion. If batched, events must ALWAYS be in |
| // chronological order. |
| PlayerEventsAdded(context.Context) (media.PlayerEventsAddedClient, error) |
| |
| // Event PlayerMessagesLogged |
| // |
| // Send a list of any messages that need to be delivered. |
| PlayerMessagesLogged(context.Context) (media.PlayerMessagesLoggedClient, error) |
| |
| // Event PlayerErrorsRaised |
| // |
| // Send a list of any errors that need to be delivered. |
| PlayerErrorsRaised(context.Context) (media.PlayerErrorsRaisedClient, error) |
| |
| // Event PlayersCreated |
| // |
| // Called whenever a player is created, or when a new agent joins and |
| // receives a list of active players. If an agent is restored, it will |
| // receive the full list of player ids and all events again. |
| PlayersCreated(context.Context) (media.PlayersCreatedClient, error) |
| } |
| |
| // The Memory domain. |
| // |
| // Note: This domain is experimental. |
| type Memory interface { |
| // Command GetDOMCounters |
| GetDOMCounters(context.Context) (*memory.GetDOMCountersReply, error) |
| |
| // Command PrepareForLeakDetection |
| PrepareForLeakDetection(context.Context) error |
| |
| // Command ForciblyPurgeJavaScriptMemory |
| // |
| // Simulate OomIntervention by purging V8 memory. |
| ForciblyPurgeJavaScriptMemory(context.Context) error |
| |
| // Command SetPressureNotificationsSuppressed |
| // |
| // Enable/disable suppressing memory pressure notifications in all |
| // processes. |
| SetPressureNotificationsSuppressed(context.Context, *memory.SetPressureNotificationsSuppressedArgs) error |
| |
| // Command SimulatePressureNotification |
| // |
| // Simulate a memory pressure notification in all processes. |
| SimulatePressureNotification(context.Context, *memory.SimulatePressureNotificationArgs) error |
| |
| // Command StartSampling |
| // |
| // Start collecting native memory profile. |
| StartSampling(context.Context, *memory.StartSamplingArgs) error |
| |
| // Command StopSampling |
| // |
| // Stop collecting native memory profile. |
| StopSampling(context.Context) error |
| |
| // Command GetAllTimeSamplingProfile |
| // |
| // Retrieve native memory allocations profile collected since renderer |
| // process startup. |
| GetAllTimeSamplingProfile(context.Context) (*memory.GetAllTimeSamplingProfileReply, error) |
| |
| // Command GetBrowserSamplingProfile |
| // |
| // Retrieve native memory allocations profile collected since browser |
| // process startup. |
| GetBrowserSamplingProfile(context.Context) (*memory.GetBrowserSamplingProfileReply, error) |
| |
| // Command GetSamplingProfile |
| // |
| // Retrieve native memory allocations profile collected since last |
| // `startSampling` call. |
| GetSamplingProfile(context.Context) (*memory.GetSamplingProfileReply, error) |
| } |
| |
| // The Network domain. Network domain allows tracking network activities of |
| // the page. It exposes information about http, file, data and other requests |
| // and responses, their headers, bodies, timing, etc. |
| type Network interface { |
| // Command CanClearBrowserCache |
| // |
| // Deprecated: Tells whether clearing browser cache is supported. |
| CanClearBrowserCache(context.Context) (*network.CanClearBrowserCacheReply, error) |
| |
| // Command CanClearBrowserCookies |
| // |
| // Deprecated: Tells whether clearing browser cookies is supported. |
| CanClearBrowserCookies(context.Context) (*network.CanClearBrowserCookiesReply, error) |
| |
| // Command CanEmulateNetworkConditions |
| // |
| // Deprecated: Tells whether emulation of network conditions is |
| // supported. |
| CanEmulateNetworkConditions(context.Context) (*network.CanEmulateNetworkConditionsReply, error) |
| |
| // Command ClearBrowserCache |
| // |
| // Clears browser cache. |
| ClearBrowserCache(context.Context) error |
| |
| // Command ClearBrowserCookies |
| // |
| // Clears browser cookies. |
| ClearBrowserCookies(context.Context) error |
| |
| // Command ContinueInterceptedRequest |
| // |
| // Deprecated: Response to Network.requestIntercepted which either |
| // modifies the request to continue with any modifications, or blocks |
| // it, or completes it with the provided response bytes. If a network |
| // fetch occurs as a result which encounters a redirect an additional |
| // Network.requestIntercepted event will be sent with the same |
| // InterceptionId. use Fetch.continueRequest, |
| // Fetch.fulfillRequest and Fetch.failRequest instead. |
| // |
| // Note: This command is experimental. |
| ContinueInterceptedRequest(context.Context, *network.ContinueInterceptedRequestArgs) error |
| |
| // Command DeleteCookies |
| // |
| // Deletes browser cookies with matching name and url or domain/path |
| // pair. |
| DeleteCookies(context.Context, *network.DeleteCookiesArgs) error |
| |
| // Command Disable |
| // |
| // Disables network tracking, prevents network events from being sent |
| // to the client. |
| Disable(context.Context) error |
| |
| // Command EmulateNetworkConditions |
| // |
| // Activates emulation of network conditions. |
| EmulateNetworkConditions(context.Context, *network.EmulateNetworkConditionsArgs) error |
| |
| // Command Enable |
| // |
| // Enables network tracking, network events will now be delivered to |
| // the client. |
| Enable(context.Context, *network.EnableArgs) error |
| |
| // Command GetAllCookies |
| // |
| // Returns all browser cookies. Depending on the backend support, will |
| // return detailed cookie information in the `cookies` field. |
| GetAllCookies(context.Context) (*network.GetAllCookiesReply, error) |
| |
| // Command GetCertificate |
| // |
| // Returns the DER-encoded certificate. |
| // |
| // Note: This command is experimental. |
| GetCertificate(context.Context, *network.GetCertificateArgs) (*network.GetCertificateReply, error) |
| |
| // Command GetCookies |
| // |
| // Returns all browser cookies for the current URL. Depending on the |
| // backend support, will return detailed cookie information in the |
| // `cookies` field. |
| GetCookies(context.Context, *network.GetCookiesArgs) (*network.GetCookiesReply, error) |
| |
| // Command GetResponseBody |
| // |
| // Returns content served for the given request. |
| GetResponseBody(context.Context, *network.GetResponseBodyArgs) (*network.GetResponseBodyReply, error) |
| |
| // Command GetRequestPostData |
| // |
| // Returns post data sent with the request. Returns an error when no |
| // data was sent with the request. |
| GetRequestPostData(context.Context, *network.GetRequestPostDataArgs) (*network.GetRequestPostDataReply, error) |
| |
| // Command GetResponseBodyForInterception |
| // |
| // Returns content served for the given currently intercepted request. |
| // |
| // Note: This command is experimental. |
| GetResponseBodyForInterception(context.Context, *network.GetResponseBodyForInterceptionArgs) (*network.GetResponseBodyForInterceptionReply, error) |
| |
| // Command TakeResponseBodyForInterceptionAsStream |
| // |
| // Returns a handle to the stream representing the response body. Note |
| // that after this command, the intercepted request can't be continued |
| // as is -- you either need to cancel it or to provide the response |
| // body. The stream only supports sequential read, IO.read will fail if |
| // the position is specified. |
| // |
| // Note: This command is experimental. |
| TakeResponseBodyForInterceptionAsStream(context.Context, *network.TakeResponseBodyForInterceptionAsStreamArgs) (*network.TakeResponseBodyForInterceptionAsStreamReply, error) |
| |
| // Command ReplayXHR |
| // |
| // This method sends a new XMLHttpRequest which is identical to the |
| // original one. The following parameters should be identical: method, |
| // url, async, request body, extra headers, withCredentials attribute, |
| // user, password. |
| // |
| // Note: This command is experimental. |
| ReplayXHR(context.Context, *network.ReplayXHRArgs) error |
| |
| // Command SearchInResponseBody |
| // |
| // Searches for given string in response content. |
| // |
| // Note: This command is experimental. |
| SearchInResponseBody(context.Context, *network.SearchInResponseBodyArgs) (*network.SearchInResponseBodyReply, error) |
| |
| // Command SetBlockedURLs |
| // |
| // Blocks URLs from loading. |
| // |
| // Note: This command is experimental. |
| SetBlockedURLs(context.Context, *network.SetBlockedURLsArgs) error |
| |
| // Command SetBypassServiceWorker |
| // |
| // Toggles ignoring of service worker for each request. |
| // |
| // Note: This command is experimental. |
| SetBypassServiceWorker(context.Context, *network.SetBypassServiceWorkerArgs) error |
| |
| // Command SetCacheDisabled |
| // |
| // Toggles ignoring cache for each request. If `true`, cache will not |
| // be used. |
| SetCacheDisabled(context.Context, *network.SetCacheDisabledArgs) error |
| |
| // Command SetCookie |
| // |
| // Sets a cookie with the given cookie data; may overwrite equivalent |
| // cookies if they exist. |
| SetCookie(context.Context, *network.SetCookieArgs) (*network.SetCookieReply, error) |
| |
| // Command SetCookies |
| // |
| // Sets given cookies. |
| SetCookies(context.Context, *network.SetCookiesArgs) error |
| |
| // Command SetDataSizeLimitsForTest |
| // |
| // For testing. |
| // |
| // Note: This command is experimental. |
| SetDataSizeLimitsForTest(context.Context, *network.SetDataSizeLimitsForTestArgs) error |
| |
| // Command SetExtraHTTPHeaders |
| // |
| // Specifies whether to always send extra HTTP headers with the |
| // requests from this page. |
| SetExtraHTTPHeaders(context.Context, *network.SetExtraHTTPHeadersArgs) error |
| |
| // Command SetRequestInterception |
| // |
| // Deprecated: Sets the requests to intercept that match the provided |
| // patterns and optionally resource types. please use |
| // Fetch.enable instead. |
| // |
| // Note: This command is experimental. |
| SetRequestInterception(context.Context, *network.SetRequestInterceptionArgs) error |
| |
| // Event DataReceived |
| // |
| // Fired when data chunk was received over the network. |
| DataReceived(context.Context) (network.DataReceivedClient, error) |
| |
| // Event EventSourceMessageReceived |
| // |
| // Fired when EventSource message is received. |
| EventSourceMessageReceived(context.Context) (network.EventSourceMessageReceivedClient, error) |
| |
| // Event LoadingFailed |
| // |
| // Fired when HTTP request has failed to load. |
| LoadingFailed(context.Context) (network.LoadingFailedClient, error) |
| |
| // Event LoadingFinished |
| // |
| // Fired when HTTP request has finished loading. |
| LoadingFinished(context.Context) (network.LoadingFinishedClient, error) |
| |
| // Event RequestIntercepted |
| // |
| // Deprecated: Details of an intercepted HTTP request, which must be |
| // either allowed, blocked, modified or mocked. use |
| // Fetch.requestPaused instead. |
| // |
| // Note: This event is experimental. |
| RequestIntercepted(context.Context) (network.RequestInterceptedClient, error) |
| |
| // Event RequestServedFromCache |
| // |
| // Fired if request ended up loading from cache. |
| RequestServedFromCache(context.Context) (network.RequestServedFromCacheClient, error) |
| |
| // Event RequestWillBeSent |
| // |
| // Fired when page is about to send HTTP request. |
| RequestWillBeSent(context.Context) (network.RequestWillBeSentClient, error) |
| |
| // Event ResourceChangedPriority |
| // |
| // Fired when resource loading priority is changed |
| // |
| // Note: This event is experimental. |
| ResourceChangedPriority(context.Context) (network.ResourceChangedPriorityClient, error) |
| |
| // Event SignedExchangeReceived |
| // |
| // Fired when a signed exchange was received over the network |
| // |
| // Note: This event is experimental. |
| SignedExchangeReceived(context.Context) (network.SignedExchangeReceivedClient, error) |
| |
| // Event ResponseReceived |
| // |
| // Fired when HTTP response is available. |
| ResponseReceived(context.Context) (network.ResponseReceivedClient, error) |
| |
| // Event WebSocketClosed |
| // |
| // Fired when WebSocket is closed. |
| WebSocketClosed(context.Context) (network.WebSocketClosedClient, error) |
| |
| // Event WebSocketCreated |
| // |
| // Fired upon WebSocket creation. |
| WebSocketCreated(context.Context) (network.WebSocketCreatedClient, error) |
| |
| // Event WebSocketFrameError |
| // |
| // Fired when WebSocket message error occurs. |
| WebSocketFrameError(context.Context) (network.WebSocketFrameErrorClient, error) |
| |
| // Event WebSocketFrameReceived |
| // |
| // Fired when WebSocket message is received. |
| WebSocketFrameReceived(context.Context) (network.WebSocketFrameReceivedClient, error) |
| |
| // Event WebSocketFrameSent |
| // |
| // Fired when WebSocket message is sent. |
| WebSocketFrameSent(context.Context) (network.WebSocketFrameSentClient, error) |
| |
| // Event WebSocketHandshakeResponseReceived |
| // |
| // Fired when WebSocket handshake response becomes available. |
| WebSocketHandshakeResponseReceived(context.Context) (network.WebSocketHandshakeResponseReceivedClient, error) |
| |
| // Event WebSocketWillSendHandshakeRequest |
| // |
| // Fired when WebSocket is about to initiate handshake. |
| WebSocketWillSendHandshakeRequest(context.Context) (network.WebSocketWillSendHandshakeRequestClient, error) |
| |
| // Event RequestWillBeSentExtraInfo |
| // |
| // Fired when additional information about a requestWillBeSent event |
| // is available from the network stack. Not every requestWillBeSent |
| // event will have an additional requestWillBeSentExtraInfo fired for |
| // it, and there is no guarantee whether requestWillBeSent or |
| // requestWillBeSentExtraInfo will be fired first for the same request. |
| // |
| // Note: This event is experimental. |
| RequestWillBeSentExtraInfo(context.Context) (network.RequestWillBeSentExtraInfoClient, error) |
| |
| // Event ResponseReceivedExtraInfo |
| // |
| // Fired when additional information about a responseReceived event is |
| // available from the network stack. Not every responseReceived event |
| // will have an additional responseReceivedExtraInfo for it, and |
| // responseReceivedExtraInfo may be fired before or after |
| // responseReceived. |
| // |
| // Note: This event is experimental. |
| ResponseReceivedExtraInfo(context.Context) (network.ResponseReceivedExtraInfoClient, error) |
| } |
| |
| // The Overlay domain. This domain provides various functionality related to |
| // drawing atop the inspected page. |
| // |
| // Note: This domain is experimental. |
| type Overlay interface { |
| // Command Disable |
| // |
| // Disables domain notifications. |
| Disable(context.Context) error |
| |
| // Command Enable |
| // |
| // Enables domain notifications. |
| Enable(context.Context) error |
| |
| // Command GetHighlightObjectForTest |
| // |
| // For testing. |
| GetHighlightObjectForTest(context.Context, *overlay.GetHighlightObjectForTestArgs) (*overlay.GetHighlightObjectForTestReply, error) |
| |
| // Command HideHighlight |
| // |
| // Hides any highlight. |
| HideHighlight(context.Context) error |
| |
| // Command HighlightFrame |
| // |
| // Highlights owner element of the frame with given id. |
| HighlightFrame(context.Context, *overlay.HighlightFrameArgs) error |
| |
| // Command HighlightNode |
| // |
| // Highlights DOM node with given id or with the given JavaScript |
| // object wrapper. Either nodeId or objectId must be specified. |
| HighlightNode(context.Context, *overlay.HighlightNodeArgs) error |
| |
| // Command HighlightQuad |
| // |
| // Highlights given quad. Coordinates are absolute with respect to the |
| // main frame viewport. |
| HighlightQuad(context.Context, *overlay.HighlightQuadArgs) error |
| |
| // Command HighlightRect |
| // |
| // Highlights given rectangle. Coordinates are absolute with respect |
| // to the main frame viewport. |
| HighlightRect(context.Context, *overlay.HighlightRectArgs) error |
| |
| // Command SetInspectMode |
| // |
| // Enters the 'inspect' mode. In this mode, elements that user is |
| // hovering over are highlighted. Backend then generates |
| // 'inspectNodeRequested' event upon element selection. |
| SetInspectMode(context.Context, *overlay.SetInspectModeArgs) error |
| |
| // Command SetShowAdHighlights |
| // |
| // Highlights owner element of all frames detected to be ads. |
| SetShowAdHighlights(context.Context, *overlay.SetShowAdHighlightsArgs) error |
| |
| // Command SetPausedInDebuggerMessage |
| SetPausedInDebuggerMessage(context.Context, *overlay.SetPausedInDebuggerMessageArgs) error |
| |
| // Command SetShowDebugBorders |
| // |
| // Requests that backend shows debug borders on layers |
| SetShowDebugBorders(context.Context, *overlay.SetShowDebugBordersArgs) error |
| |
| // Command SetShowFPSCounter |
| // |
| // Requests that backend shows the FPS counter |
| SetShowFPSCounter(context.Context, *overlay.SetShowFPSCounterArgs) error |
| |
| // Command SetShowPaintRects |
| // |
| // Requests that backend shows paint rectangles |
| SetShowPaintRects(context.Context, *overlay.SetShowPaintRectsArgs) error |
| |
| // Command SetShowLayoutShiftRegions |
| // |
| // Requests that backend shows layout shift regions |
| SetShowLayoutShiftRegions(context.Context, *overlay.SetShowLayoutShiftRegionsArgs) error |
| |
| // Command SetShowScrollBottleneckRects |
| // |
| // Requests that backend shows scroll bottleneck rects |
| SetShowScrollBottleneckRects(context.Context, *overlay.SetShowScrollBottleneckRectsArgs) error |
| |
| // Command SetShowHitTestBorders |
| // |
| // Requests that backend shows hit-test borders on layers |
| SetShowHitTestBorders(context.Context, *overlay.SetShowHitTestBordersArgs) error |
| |
| // Command SetShowViewportSizeOnResize |
| // |
| // Paints viewport size upon main frame resize. |
| SetShowViewportSizeOnResize(context.Context, *overlay.SetShowViewportSizeOnResizeArgs) error |
| |
| // Command SetShowHinge |
| // |
| // Add a dual screen device hinge |
| SetShowHinge(context.Context, *overlay.SetShowHingeArgs) error |
| |
| // Event InspectNodeRequested |
| // |
| // Fired when the node should be inspected. This happens after call to |
| // `setInspectMode` or when user manually inspects an element. |
| InspectNodeRequested(context.Context) (overlay.InspectNodeRequestedClient, error) |
| |
| // Event NodeHighlightRequested |
| // |
| // Fired when the node should be highlighted. This happens after call |
| // to `setInspectMode`. |
| NodeHighlightRequested(context.Context) (overlay.NodeHighlightRequestedClient, error) |
| |
| // Event ScreenshotRequested |
| // |
| // Fired when user asks to capture screenshot of some area on the |
| // page. |
| ScreenshotRequested(context.Context) (overlay.ScreenshotRequestedClient, error) |
| |
| // Event InspectModeCanceled |
| // |
| // Fired when user cancels the inspect mode. |
| InspectModeCanceled(context.Context) (overlay.InspectModeCanceledClient, error) |
| } |
| |
| // The Page domain. Actions and events related to the inspected page belong to |
| // the page domain. |
| type Page interface { |
| // Command AddScriptToEvaluateOnLoad |
| // |
| // Deprecated: Please use addScriptToEvaluateOnNewDocument |
| // instead. |
| // |
| // Note: This command is experimental. |
| AddScriptToEvaluateOnLoad(context.Context, *page.AddScriptToEvaluateOnLoadArgs) (*page.AddScriptToEvaluateOnLoadReply, error) |
| |
| // Command AddScriptToEvaluateOnNewDocument |
| // |
| // Evaluates given script in every frame upon creation (before loading |
| // frame's scripts). |
| AddScriptToEvaluateOnNewDocument(context.Context, *page.AddScriptToEvaluateOnNewDocumentArgs) (*page.AddScriptToEvaluateOnNewDocumentReply, error) |
| |
| // Command BringToFront |
| // |
| // Brings page to front (activates tab). |
| BringToFront(context.Context) error |
| |
| // Command CaptureScreenshot |
| // |
| // Capture page screenshot. |
| CaptureScreenshot(context.Context, *page.CaptureScreenshotArgs) (*page.CaptureScreenshotReply, error) |
| |
| // Command CaptureSnapshot |
| // |
| // Returns a snapshot of the page as a string. For MHTML format, the |
| // serialization includes iframes, shadow DOM, external resources, and |
| // element-inline styles. |
| // |
| // Note: This command is experimental. |
| CaptureSnapshot(context.Context, *page.CaptureSnapshotArgs) (*page.CaptureSnapshotReply, error) |
| |
| // Command CreateIsolatedWorld |
| // |
| // Creates an isolated world for the given frame. |
| CreateIsolatedWorld(context.Context, *page.CreateIsolatedWorldArgs) (*page.CreateIsolatedWorldReply, error) |
| |
| // Command Disable |
| // |
| // Disables page domain notifications. |
| Disable(context.Context) error |
| |
| // Command Enable |
| // |
| // Enables page domain notifications. |
| Enable(context.Context) error |
| |
| // Command GetAppManifest |
| GetAppManifest(context.Context) (*page.GetAppManifestReply, error) |
| |
| // Command GetInstallabilityErrors |
| // |
| // Note: This command is experimental. |
| GetInstallabilityErrors(context.Context) (*page.GetInstallabilityErrorsReply, error) |
| |
| // Command GetManifestIcons |
| // |
| // Note: This command is experimental. |
| GetManifestIcons(context.Context) (*page.GetManifestIconsReply, error) |
| |
| // Command GetFrameTree |
| // |
| // Returns present frame tree structure. |
| GetFrameTree(context.Context) (*page.GetFrameTreeReply, error) |
| |
| // Command GetLayoutMetrics |
| // |
| // Returns metrics relating to the layouting of the page, such as |
| // viewport bounds/scale. |
| GetLayoutMetrics(context.Context) (*page.GetLayoutMetricsReply, error) |
| |
| // Command GetNavigationHistory |
| // |
| // Returns navigation history for the current page. |
| GetNavigationHistory(context.Context) (*page.GetNavigationHistoryReply, error) |
| |
| // Command ResetNavigationHistory |
| // |
| // Resets navigation history for the current page. |
| ResetNavigationHistory(context.Context) error |
| |
| // Command GetResourceContent |
| // |
| // Returns content of the given resource. |
| // |
| // Note: This command is experimental. |
| GetResourceContent(context.Context, *page.GetResourceContentArgs) (*page.GetResourceContentReply, error) |
| |
| // Command GetResourceTree |
| // |
| // Returns present frame / resource tree structure. |
| // |
| // Note: This command is experimental. |
| GetResourceTree(context.Context) (*page.GetResourceTreeReply, error) |
| |
| // Command HandleJavaScriptDialog |
| // |
| // Accepts or dismisses a JavaScript initiated dialog (alert, confirm, |
| // prompt, or onbeforeunload). |
| HandleJavaScriptDialog(context.Context, *page.HandleJavaScriptDialogArgs) error |
| |
| // Command Navigate |
| // |
| // Navigates current page to the given URL. |
| Navigate(context.Context, *page.NavigateArgs) (*page.NavigateReply, error) |
| |
| // Command NavigateToHistoryEntry |
| // |
| // Navigates current page to the given history entry. |
| NavigateToHistoryEntry(context.Context, *page.NavigateToHistoryEntryArgs) error |
| |
| // Command PrintToPDF |
| // |
| // Print page as PDF. |
| PrintToPDF(context.Context, *page.PrintToPDFArgs) (*page.PrintToPDFReply, error) |
| |
| // Command Reload |
| // |
| // Reloads given page optionally ignoring the cache. |
| Reload(context.Context, *page.ReloadArgs) error |
| |
| // Command RemoveScriptToEvaluateOnLoad |
| // |
| // Deprecated: Please use |
| // removeScriptToEvaluateOnNewDocument instead. |
| // |
| // Note: This command is experimental. |
| RemoveScriptToEvaluateOnLoad(context.Context, *page.RemoveScriptToEvaluateOnLoadArgs) error |
| |
| // Command RemoveScriptToEvaluateOnNewDocument |
| // |
| // Removes given script from the list. |
| RemoveScriptToEvaluateOnNewDocument(context.Context, *page.RemoveScriptToEvaluateOnNewDocumentArgs) error |
| |
| // Command ScreencastFrameAck |
| // |
| // Acknowledges that a screencast frame has been received by the |
| // frontend. |
| // |
| // Note: This command is experimental. |
| ScreencastFrameAck(context.Context, *page.ScreencastFrameAckArgs) error |
| |
| // Command SearchInResource |
| // |
| // Searches for given string in resource content. |
| // |
| // Note: This command is experimental. |
| SearchInResource(context.Context, *page.SearchInResourceArgs) (*page.SearchInResourceReply, error) |
| |
| // Command SetAdBlockingEnabled |
| // |
| // Enable Chrome's experimental ad filter on all sites. |
| // |
| // Note: This command is experimental. |
| SetAdBlockingEnabled(context.Context, *page.SetAdBlockingEnabledArgs) error |
| |
| // Command SetBypassCSP |
| // |
| // Enable page Content Security Policy by-passing. |
| // |
| // Note: This command is experimental. |
| SetBypassCSP(context.Context, *page.SetBypassCSPArgs) error |
| |
| // Command SetFontFamilies |
| // |
| // Set generic font families. |
| // |
| // Note: This command is experimental. |
| SetFontFamilies(context.Context, *page.SetFontFamiliesArgs) error |
| |
| // Command SetFontSizes |
| // |
| // Set default font sizes. |
| // |
| // Note: This command is experimental. |
| SetFontSizes(context.Context, *page.SetFontSizesArgs) error |
| |
| // Command SetDocumentContent |
| // |
| // Sets given markup as the document's HTML. |
| SetDocumentContent(context.Context, *page.SetDocumentContentArgs) error |
| |
| // Command SetDownloadBehavior |
| // |
| // Deprecated: Set the behavior when downloading a file. |
| // |
| // Note: This command is experimental. |
| SetDownloadBehavior(context.Context, *page.SetDownloadBehaviorArgs) error |
| |
| // Command SetLifecycleEventsEnabled |
| // |
| // Controls whether page will emit lifecycle events. |
| // |
| // Note: This command is experimental. |
| SetLifecycleEventsEnabled(context.Context, *page.SetLifecycleEventsEnabledArgs) error |
| |
| // Command StartScreencast |
| // |
| // Starts sending each frame using the `screencastFrame` event. |
| // |
| // Note: This command is experimental. |
| StartScreencast(context.Context, *page.StartScreencastArgs) error |
| |
| // Command StopLoading |
| // |
| // Force the page stop all navigations and pending resource fetches. |
| StopLoading(context.Context) error |
| |
| // Command Crash |
| // |
| // Crashes renderer on the IO thread, generates minidumps. |
| // |
| // Note: This command is experimental. |
| Crash(context.Context) error |
| |
| // Command Close |
| // |
| // Tries to close page, running its beforeunload hooks, if any. |
| // |
| // Note: This command is experimental. |
| Close(context.Context) error |
| |
| // Command SetWebLifecycleState |
| // |
| // Tries to update the web lifecycle state of the page. It will |
| // transition the page to the given state according to: |
| // https://github.com/WICG/web-lifecycle/ |
| // |
| // Note: This command is experimental. |
| SetWebLifecycleState(context.Context, *page.SetWebLifecycleStateArgs) error |
| |
| // Command StopScreencast |
| // |
| // Stops sending each frame in the `screencastFrame`. |
| // |
| // Note: This command is experimental. |
| StopScreencast(context.Context) error |
| |
| // Command SetProduceCompilationCache |
| // |
| // Forces compilation cache to be generated for every subresource |
| // script. |
| // |
| // Note: This command is experimental. |
| SetProduceCompilationCache(context.Context, *page.SetProduceCompilationCacheArgs) error |
| |
| // Command AddCompilationCache |
| // |
| // Seeds compilation cache for given url. Compilation cache does not |
| // survive cross-process navigation. |
| // |
| // Note: This command is experimental. |
| AddCompilationCache(context.Context, *page.AddCompilationCacheArgs) error |
| |
| // Command ClearCompilationCache |
| // |
| // Clears seeded compilation cache. |
| // |
| // Note: This command is experimental. |
| ClearCompilationCache(context.Context) error |
| |
| // Command GenerateTestReport |
| // |
| // Generates a report for testing. |
| // |
| // Note: This command is experimental. |
| GenerateTestReport(context.Context, *page.GenerateTestReportArgs) error |
| |
| // Command WaitForDebugger |
| // |
| // Pauses page execution. Can be resumed using generic |
| // Runtime.runIfWaitingForDebugger. |
| // |
| // Note: This command is experimental. |
| WaitForDebugger(context.Context) error |
| |
| // Command SetInterceptFileChooserDialog |
| // |
| // Intercept file chooser requests and transfer control to protocol |
| // clients. When file chooser interception is enabled, native file |
| // chooser dialog is not shown. Instead, a protocol event |
| // `Page.fileChooserOpened` is emitted. |
| // |
| // Note: This command is experimental. |
| SetInterceptFileChooserDialog(context.Context, *page.SetInterceptFileChooserDialogArgs) error |
| |
| // Event DOMContentEventFired |
| DOMContentEventFired(context.Context) (page.DOMContentEventFiredClient, error) |
| |
| // Event FileChooserOpened |
| // |
| // Emitted only when `page.interceptFileChooser` is enabled. |
| FileChooserOpened(context.Context) (page.FileChooserOpenedClient, error) |
| |
| // Event FrameAttached |
| // |
| // Fired when frame has been attached to its parent. |
| FrameAttached(context.Context) (page.FrameAttachedClient, error) |
| |
| // Event FrameClearedScheduledNavigation |
| // |
| // Deprecated: Fired when frame no longer has a scheduled navigation. |
| FrameClearedScheduledNavigation(context.Context) (page.FrameClearedScheduledNavigationClient, error) |
| |
| // Event FrameDetached |
| // |
| // Fired when frame has been detached from its parent. |
| FrameDetached(context.Context) (page.FrameDetachedClient, error) |
| |
| // Event FrameNavigated |
| // |
| // Fired once navigation of the frame has completed. Frame is now |
| // associated with the new loader. |
| FrameNavigated(context.Context) (page.FrameNavigatedClient, error) |
| |
| // Event FrameResized |
| // |
| // Note: This event is experimental. |
| FrameResized(context.Context) (page.FrameResizedClient, error) |
| |
| // Event FrameRequestedNavigation |
| // |
| // Fired when a renderer-initiated navigation is requested. Navigation |
| // may still be canceled after the event is issued. |
| // |
| // Note: This event is experimental. |
| FrameRequestedNavigation(context.Context) (page.FrameRequestedNavigationClient, error) |
| |
| // Event FrameScheduledNavigation |
| // |
| // Deprecated: Fired when frame schedules a potential navigation. |
| FrameScheduledNavigation(context.Context) (page.FrameScheduledNavigationClient, error) |
| |
| // Event FrameStartedLoading |
| // |
| // Fired when frame has started loading. |
| // |
| // Note: This event is experimental. |
| FrameStartedLoading(context.Context) (page.FrameStartedLoadingClient, error) |
| |
| // Event FrameStoppedLoading |
| // |
| // Fired when frame has stopped loading. |
| // |
| // Note: This event is experimental. |
| FrameStoppedLoading(context.Context) (page.FrameStoppedLoadingClient, error) |
| |
| // Event DownloadWillBegin |
| // |
| // Fired when page is about to start a download. |
| // |
| // Note: This event is experimental. |
| DownloadWillBegin(context.Context) (page.DownloadWillBeginClient, error) |
| |
| // Event DownloadProgress |
| // |
| // Fired when download makes progress. Last call has |done| == true. |
| // |
| // Note: This event is experimental. |
| DownloadProgress(context.Context) (page.DownloadProgressClient, error) |
| |
| // Event InterstitialHidden |
| // |
| // Fired when interstitial page was hidden |
| InterstitialHidden(context.Context) (page.InterstitialHiddenClient, error) |
| |
| // Event InterstitialShown |
| // |
| // Fired when interstitial page was shown |
| InterstitialShown(context.Context) (page.InterstitialShownClient, error) |
| |
| // Event JavascriptDialogClosed |
| // |
| // Fired when a JavaScript initiated dialog (alert, confirm, prompt, |
| // or onbeforeunload) has been closed. |
| JavascriptDialogClosed(context.Context) (page.JavascriptDialogClosedClient, error) |
| |
| // Event JavascriptDialogOpening |
| // |
| // Fired when a JavaScript initiated dialog (alert, confirm, prompt, |
| // or onbeforeunload) is about to open. |
| JavascriptDialogOpening(context.Context) (page.JavascriptDialogOpeningClient, error) |
| |
| // Event LifecycleEvent |
| // |
| // Fired for top level page lifecycle events such as navigation, load, |
| // paint, etc. |
| LifecycleEvent(context.Context) (page.LifecycleEventClient, error) |
| |
| // Event LoadEventFired |
| LoadEventFired(context.Context) (page.LoadEventFiredClient, error) |
| |
| // Event NavigatedWithinDocument |
| // |
| // Fired when same-document navigation happens, e.g. due to history |
| // API usage or anchor navigation. |
| // |
| // Note: This event is experimental. |
| NavigatedWithinDocument(context.Context) (page.NavigatedWithinDocumentClient, error) |
| |
| // Event ScreencastFrame |
| // |
| // Compressed image data requested by the `startScreencast`. |
| // |
| // Note: This event is experimental. |
| ScreencastFrame(context.Context) (page.ScreencastFrameClient, error) |
| |
| // Event ScreencastVisibilityChanged |
| // |
| // Fired when the page with currently enabled screencast was shown or |
| // hidden `. |
| // |
| // Note: This event is experimental. |
| ScreencastVisibilityChanged(context.Context) (page.ScreencastVisibilityChangedClient, error) |
| |
| // Event WindowOpen |
| // |
| // Fired when a new window is going to be opened, via window.open(), |
| // link click, form submission, etc. |
| WindowOpen(context.Context) (page.WindowOpenClient, error) |
| |
| // Event CompilationCacheProduced |
| // |
| // Issued for every compilation cache generated. Is only available if |
| // Page.setGenerateCompilationCache is enabled. |
| // |
| // Note: This event is experimental. |
| CompilationCacheProduced(context.Context) (page.CompilationCacheProducedClient, error) |
| } |
| |
| // The Performance domain. |
| type Performance interface { |
| // Command Disable |
| // |
| // Disable collecting and reporting metrics. |
| Disable(context.Context) error |
| |
| // Command Enable |
| // |
| // Enable collecting and reporting metrics. |
| Enable(context.Context, *performance.EnableArgs) error |
| |
| // Command SetTimeDomain |
| // |
| // Deprecated: Sets time domain to use for collecting and reporting |
| // duration metrics. Note that this must be called before enabling |
| // metrics collection. Calling this method while metrics collection is |
| // enabled returns an error. |
| // |
| // Note: This command is experimental. |
| SetTimeDomain(context.Context, *performance.SetTimeDomainArgs) error |
| |
| // Command GetMetrics |
| // |
| // Retrieve current values of run-time metrics. |
| GetMetrics(context.Context) (*performance.GetMetricsReply, error) |
| |
| // Event Metrics |
| // |
| // Current values of the metrics. |
| Metrics(context.Context) (performance.MetricsClient, error) |
| } |
| |
| // The Profiler domain. |
| type Profiler interface { |
| // Command Disable |
| Disable(context.Context) error |
| |
| // Command Enable |
| Enable(context.Context) error |
| |
| // Command GetBestEffortCoverage |
| // |
| // Collect coverage data for the current isolate. The coverage data |
| // may be incomplete due to garbage collection. |
| GetBestEffortCoverage(context.Context) (*profiler.GetBestEffortCoverageReply, error) |
| |
| // Command SetSamplingInterval |
| // |
| // Changes CPU profiler sampling interval. Must be called before CPU |
| // profiles recording started. |
| SetSamplingInterval(context.Context, *profiler.SetSamplingIntervalArgs) error |
| |
| // Command Start |
| Start(context.Context) error |
| |
| // Command StartPreciseCoverage |
| // |
| // Enable precise code coverage. Coverage data for JavaScript executed |
| // before enabling precise code coverage may be incomplete. Enabling |
| // prevents running optimized code and resets execution counters. |
| StartPreciseCoverage(context.Context, *profiler.StartPreciseCoverageArgs) (*profiler.StartPreciseCoverageReply, error) |
| |
| // Command StartTypeProfile |
| // |
| // Enable type profile. |
| // |
| // Note: This command is experimental. |
| StartTypeProfile(context.Context) error |
| |
| // Command Stop |
| Stop(context.Context) (*profiler.StopReply, error) |
| |
| // Command StopPreciseCoverage |
| // |
| // Disable precise code coverage. Disabling releases unnecessary |
| // execution count records and allows executing optimized code. |
| StopPreciseCoverage(context.Context) error |
| |
| // Command StopTypeProfile |
| // |
| // Disable type profile. Disabling releases type profile data |
| // collected so far. |
| // |
| // Note: This command is experimental. |
| StopTypeProfile(context.Context) error |
| |
| // Command TakePreciseCoverage |
| // |
| // Collect coverage data for the current isolate, and resets execution |
| // counters. Precise code coverage needs to have started. |
| TakePreciseCoverage(context.Context) (*profiler.TakePreciseCoverageReply, error) |
| |
| // Command TakeTypeProfile |
| // |
| // Collect type profile. |
| // |
| // Note: This command is experimental. |
| TakeTypeProfile(context.Context) (*profiler.TakeTypeProfileReply, error) |
| |
| // Command EnableRuntimeCallStats |
| // |
| // Enable run time call stats collection. |
| // |
| // Note: This command is experimental. |
| EnableRuntimeCallStats(context.Context) error |
| |
| // Command DisableRuntimeCallStats |
| // |
| // Disable run time call stats collection. |
| // |
| // Note: This command is experimental. |
| DisableRuntimeCallStats(context.Context) error |
| |
| // Command GetRuntimeCallStats |
| // |
| // Retrieve run time call stats. |
| // |
| // Note: This command is experimental. |
| GetRuntimeCallStats(context.Context) (*profiler.GetRuntimeCallStatsReply, error) |
| |
| // Event ConsoleProfileFinished |
| ConsoleProfileFinished(context.Context) (profiler.ConsoleProfileFinishedClient, error) |
| |
| // Event ConsoleProfileStarted |
| // |
| // Sent when new profile recording is started using console.profile() |
| // call. |
| ConsoleProfileStarted(context.Context) (profiler.ConsoleProfileStartedClient, error) |
| |
| // Event PreciseCoverageDeltaUpdate |
| // |
| // Reports coverage delta since the last poll (either from an event |
| // like this, or from `takePreciseCoverage` for the current isolate. |
| // May only be sent if precise code coverage has been started. This |
| // event can be trigged by the embedder to, for example, trigger |
| // collection of coverage data immediately at a certain point in time. |
| // |
| // Note: This event is experimental. |
| PreciseCoverageDeltaUpdate(context.Context) (profiler.PreciseCoverageDeltaUpdateClient, error) |
| } |
| |
| // The Runtime domain. Runtime domain exposes JavaScript runtime by means of |
| // remote evaluation and mirror objects. Evaluation results are returned as |
| // mirror object that expose object type, string representation and unique |
| // identifier that can be used for further object reference. Original objects |
| // are maintained in memory unless they are either explicitly released or are |
| // released along with the other objects in their object group. |
| type Runtime interface { |
| // Command AwaitPromise |
| // |
| // Add handler to promise with given promise object id. |
| AwaitPromise(context.Context, *runtime.AwaitPromiseArgs) (*runtime.AwaitPromiseReply, error) |
| |
| // Command CallFunctionOn |
| // |
| // Calls function with given declaration on the given object. Object |
| // group of the result is inherited from the target object. |
| CallFunctionOn(context.Context, *runtime.CallFunctionOnArgs) (*runtime.CallFunctionOnReply, error) |
| |
| // Command CompileScript |
| // |
| // Compiles expression. |
| CompileScript(context.Context, *runtime.CompileScriptArgs) (*runtime.CompileScriptReply, error) |
| |
| // Command Disable |
| // |
| // Disables reporting of execution contexts creation. |
| Disable(context.Context) error |
| |
| // Command DiscardConsoleEntries |
| // |
| // Discards collected exceptions and console API calls. |
| DiscardConsoleEntries(context.Context) error |
| |
| // Command Enable |
| // |
| // Enables reporting of execution contexts creation by means of |
| // `executionContextCreated` event. When the reporting gets enabled the |
| // event will be sent immediately for each existing execution context. |
| Enable(context.Context) error |
| |
| // Command Evaluate |
| // |
| // Evaluates expression on global object. |
| Evaluate(context.Context, *runtime.EvaluateArgs) (*runtime.EvaluateReply, error) |
| |
| // Command GetIsolateID |
| // |
| // Returns the isolate id. |
| // |
| // Note: This command is experimental. |
| GetIsolateID(context.Context) (*runtime.GetIsolateIDReply, error) |
| |
| // Command GetHeapUsage |
| // |
| // Returns the JavaScript heap usage. It is the total usage of the |
| // corresponding isolate not scoped to a particular Runtime. |
| // |
| // Note: This command is experimental. |
| GetHeapUsage(context.Context) (*runtime.GetHeapUsageReply, error) |
| |
| // Command GetProperties |
| // |
| // Returns properties of a given object. Object group of the result is |
| // inherited from the target object. |
| GetProperties(context.Context, *runtime.GetPropertiesArgs) (*runtime.GetPropertiesReply, error) |
| |
| // Command GlobalLexicalScopeNames |
| // |
| // Returns all let, const and class variables from global scope. |
| GlobalLexicalScopeNames(context.Context, *runtime.GlobalLexicalScopeNamesArgs) (*runtime.GlobalLexicalScopeNamesReply, error) |
| |
| // Command QueryObjects |
| QueryObjects(context.Context, *runtime.QueryObjectsArgs) (*runtime.QueryObjectsReply, error) |
| |
| // Command ReleaseObject |
| // |
| // Releases remote object with given id. |
| ReleaseObject(context.Context, *runtime.ReleaseObjectArgs) error |
| |
| // Command ReleaseObjectGroup |
| // |
| // Releases all remote objects that belong to a given group. |
| ReleaseObjectGroup(context.Context, *runtime.ReleaseObjectGroupArgs) error |
| |
| // Command RunIfWaitingForDebugger |
| // |
| // Tells inspected instance to run if it was waiting for debugger to |
| // attach. |
| RunIfWaitingForDebugger(context.Context) error |
| |
| // Command RunScript |
| // |
| // Runs script with given id in a given context. |
| RunScript(context.Context, *runtime.RunScriptArgs) (*runtime.RunScriptReply, error) |
| |
| // Command SetCustomObjectFormatterEnabled |
| // |
| // Note: This command is experimental. |
| SetCustomObjectFormatterEnabled(context.Context, *runtime.SetCustomObjectFormatterEnabledArgs) error |
| |
| // Command SetMaxCallStackSizeToCapture |
| // |
| // Note: This command is experimental. |
| SetMaxCallStackSizeToCapture(context.Context, *runtime.SetMaxCallStackSizeToCaptureArgs) error |
| |
| // Command TerminateExecution |
| // |
| // Terminate current or next JavaScript execution. Will cancel the |
| // termination when the outer-most script execution ends. |
| // |
| // Note: This command is experimental. |
| TerminateExecution(context.Context) error |
| |
| // Command AddBinding |
| // |
| // If executionContextId is empty, adds binding with the given name on |
| // the global objects of all inspected contexts, including those |
| // created later, bindings survive reloads. If executionContextId is |
| // specified, adds binding only on global object of given execution |
| // context. Binding function takes exactly one argument, this argument |
| // should be string, in case of any other input, function throws an |
| // exception. Each binding function call produces Runtime.bindingCalled |
| // notification. |
| // |
| // Note: This command is experimental. |
| AddBinding(context.Context, *runtime.AddBindingArgs) error |
| |
| // Command RemoveBinding |
| // |
| // This method does not remove binding function from global object but |
| // unsubscribes current runtime agent from Runtime.bindingCalled |
| // notifications. |
| // |
| // Note: This command is experimental. |
| RemoveBinding(context.Context, *runtime.RemoveBindingArgs) error |
| |
| // Event BindingCalled |
| // |
| // Notification is issued every time when binding is called. |
| // |
| // Note: This event is experimental. |
| BindingCalled(context.Context) (runtime.BindingCalledClient, error) |
| |
| // Event ConsoleAPICalled |
| // |
| // Issued when console API was called. |
| ConsoleAPICalled(context.Context) (runtime.ConsoleAPICalledClient, error) |
| |
| // Event ExceptionRevoked |
| // |
| // Issued when unhandled exception was revoked. |
| ExceptionRevoked(context.Context) (runtime.ExceptionRevokedClient, error) |
| |
| // Event ExceptionThrown |
| // |
| // Issued when exception was thrown and unhandled. |
| ExceptionThrown(context.Context) (runtime.ExceptionThrownClient, error) |
| |
| // Event ExecutionContextCreated |
| // |
| // Issued when new execution context is created. |
| ExecutionContextCreated(context.Context) (runtime.ExecutionContextCreatedClient, error) |
| |
| // Event ExecutionContextDestroyed |
| // |
| // Issued when execution context is destroyed. |
| ExecutionContextDestroyed(context.Context) (runtime.ExecutionContextDestroyedClient, error) |
| |
| // Event ExecutionContextsCleared |
| // |
| // Issued when all executionContexts were cleared in browser |
| ExecutionContextsCleared(context.Context) (runtime.ExecutionContextsClearedClient, error) |
| |
| // Event InspectRequested |
| // |
| // Issued when object should be inspected (for example, as a result of |
| // inspect() command line API call). |
| InspectRequested(context.Context) (runtime.InspectRequestedClient, error) |
| } |
| |
| // The Schema domain. |
| // |
| // Deprecated: This domain is deprecated. |
| type Schema interface { |
| // Command GetDomains |
| // |
| // Returns supported domains. |
| GetDomains(context.Context) (*schema.GetDomainsReply, error) |
| } |
| |
| // The Security domain. Security |
| type Security interface { |
| // Command Disable |
| // |
| // Disables tracking security state changes. |
| Disable(context.Context) error |
| |
| // Command Enable |
| // |
| // Enables tracking security state changes. |
| Enable(context.Context) error |
| |
| // Command SetIgnoreCertificateErrors |
| // |
| // Enable/disable whether all certificate errors should be ignored. |
| // |
| // Note: This command is experimental. |
| SetIgnoreCertificateErrors(context.Context, *security.SetIgnoreCertificateErrorsArgs) error |
| |
| // Command HandleCertificateError |
| // |
| // Deprecated: Handles a certificate error that fired a |
| // certificateError event. |
| HandleCertificateError(context.Context, *security.HandleCertificateErrorArgs) error |
| |
| // Command SetOverrideCertificateErrors |
| // |
| // Deprecated: Enable/disable overriding certificate errors. If |
| // enabled, all certificate error events need to be handled by the |
| // DevTools client and should be answered with `handleCertificateError` |
| // commands. |
| SetOverrideCertificateErrors(context.Context, *security.SetOverrideCertificateErrorsArgs) error |
| |
| // Event CertificateError |
| // |
| // Deprecated: There is a certificate error. If overriding certificate |
| // errors is enabled, then it should be handled with the |
| // `handleCertificateError` command. Note: this event does not fire if |
| // the certificate error has been allowed internally. Only one client |
| // per target should override certificate errors at the same time. |
| CertificateError(context.Context) (security.CertificateErrorClient, error) |
| |
| // Event VisibleSecurityStateChanged |
| // |
| // The security state of the page changed. |
| // |
| // Note: This event is experimental. |
| VisibleSecurityStateChanged(context.Context) (security.VisibleSecurityStateChangedClient, error) |
| |
| // Event SecurityStateChanged |
| // |
| // The security state of the page changed. |
| SecurityStateChanged(context.Context) (security.StateChangedClient, error) |
| } |
| |
| // The ServiceWorker domain. |
| // |
| // Note: This domain is experimental. |
| type ServiceWorker interface { |
| // Command DeliverPushMessage |
| DeliverPushMessage(context.Context, *serviceworker.DeliverPushMessageArgs) error |
| |
| // Command Disable |
| Disable(context.Context) error |
| |
| // Command DispatchSyncEvent |
| DispatchSyncEvent(context.Context, *serviceworker.DispatchSyncEventArgs) error |
| |
| // Command DispatchPeriodicSyncEvent |
| DispatchPeriodicSyncEvent(context.Context, *serviceworker.DispatchPeriodicSyncEventArgs) error |
| |
| // Command Enable |
| Enable(context.Context) error |
| |
| // Command InspectWorker |
| InspectWorker(context.Context, *serviceworker.InspectWorkerArgs) error |
| |
| // Command SetForceUpdateOnPageLoad |
| SetForceUpdateOnPageLoad(context.Context, *serviceworker.SetForceUpdateOnPageLoadArgs) error |
| |
| // Command SkipWaiting |
| SkipWaiting(context.Context, *serviceworker.SkipWaitingArgs) error |
| |
| // Command StartWorker |
| StartWorker(context.Context, *serviceworker.StartWorkerArgs) error |
| |
| // Command StopAllWorkers |
| StopAllWorkers(context.Context) error |
| |
| // Command StopWorker |
| StopWorker(context.Context, *serviceworker.StopWorkerArgs) error |
| |
| // Command Unregister |
| Unregister(context.Context, *serviceworker.UnregisterArgs) error |
| |
| // Command UpdateRegistration |
| UpdateRegistration(context.Context, *serviceworker.UpdateRegistrationArgs) error |
| |
| // Event WorkerErrorReported |
| WorkerErrorReported(context.Context) (serviceworker.WorkerErrorReportedClient, error) |
| |
| // Event WorkerRegistrationUpdated |
| WorkerRegistrationUpdated(context.Context) (serviceworker.WorkerRegistrationUpdatedClient, error) |
| |
| // Event WorkerVersionUpdated |
| WorkerVersionUpdated(context.Context) (serviceworker.WorkerVersionUpdatedClient, error) |
| } |
| |
| // The Storage domain. |
| // |
| // Note: This domain is experimental. |
| type Storage interface { |
| // Command ClearDataForOrigin |
| // |
| // Clears storage for origin. |
| ClearDataForOrigin(context.Context, *storage.ClearDataForOriginArgs) error |
| |
| // Command GetCookies |
| // |
| // Returns all browser cookies. |
| GetCookies(context.Context, *storage.GetCookiesArgs) (*storage.GetCookiesReply, error) |
| |
| // Command SetCookies |
| // |
| // Sets given cookies. |
| SetCookies(context.Context, *storage.SetCookiesArgs) error |
| |
| // Command ClearCookies |
| // |
| // Clears cookies. |
| ClearCookies(context.Context, *storage.ClearCookiesArgs) error |
| |
| // Command GetUsageAndQuota |
| // |
| // Returns usage and quota in bytes. |
| GetUsageAndQuota(context.Context, *storage.GetUsageAndQuotaArgs) (*storage.GetUsageAndQuotaReply, error) |
| |
| // Command TrackCacheStorageForOrigin |
| // |
| // Registers origin to be notified when an update occurs to its cache |
| // storage list. |
| TrackCacheStorageForOrigin(context.Context, *storage.TrackCacheStorageForOriginArgs) error |
| |
| // Command TrackIndexedDBForOrigin |
| // |
| // Registers origin to be notified when an update occurs to its |
| // IndexedDB. |
| TrackIndexedDBForOrigin(context.Context, *storage.TrackIndexedDBForOriginArgs) error |
| |
| // Command UntrackCacheStorageForOrigin |
| // |
| // Unregisters origin from receiving notifications for cache storage. |
| UntrackCacheStorageForOrigin(context.Context, *storage.UntrackCacheStorageForOriginArgs) error |
| |
| // Command UntrackIndexedDBForOrigin |
| // |
| // Unregisters origin from receiving notifications for IndexedDB. |
| UntrackIndexedDBForOrigin(context.Context, *storage.UntrackIndexedDBForOriginArgs) error |
| |
| // Event CacheStorageContentUpdated |
| // |
| // A cache's contents have been modified. |
| CacheStorageContentUpdated(context.Context) (storage.CacheStorageContentUpdatedClient, error) |
| |
| // Event CacheStorageListUpdated |
| // |
| // A cache has been added/deleted. |
| CacheStorageListUpdated(context.Context) (storage.CacheStorageListUpdatedClient, error) |
| |
| // Event IndexedDBContentUpdated |
| // |
| // The origin's IndexedDB object store has been modified. |
| IndexedDBContentUpdated(context.Context) (storage.IndexedDBContentUpdatedClient, error) |
| |
| // Event IndexedDBListUpdated |
| // |
| // The origin's IndexedDB database list has been modified. |
| IndexedDBListUpdated(context.Context) (storage.IndexedDBListUpdatedClient, error) |
| } |
| |
| // The SystemInfo domain. The SystemInfo domain defines methods and events for |
| // querying low-level system information. |
| // |
| // Note: This domain is experimental. |
| type SystemInfo interface { |
| // Command GetInfo |
| // |
| // Returns information about the system. |
| GetInfo(context.Context) (*systeminfo.GetInfoReply, error) |
| |
| // Command GetProcessInfo |
| // |
| // Returns information about all running processes. |
| GetProcessInfo(context.Context) (*systeminfo.GetProcessInfoReply, error) |
| } |
| |
| // The Target domain. Supports additional targets discovery and allows to |
| // attach to them. |
| type Target interface { |
| // Command ActivateTarget |
| // |
| // Activates (focuses) the target. |
| ActivateTarget(context.Context, *target.ActivateTargetArgs) error |
| |
| // Command AttachToTarget |
| // |
| // Attaches to the target with given id. |
| AttachToTarget(context.Context, *target.AttachToTargetArgs) (*target.AttachToTargetReply, error) |
| |
| // Command AttachToBrowserTarget |
| // |
| // Attaches to the browser target, only uses flat sessionId mode. |
| // |
| // Note: This command is experimental. |
| AttachToBrowserTarget(context.Context) (*target.AttachToBrowserTargetReply, error) |
| |
| // Command CloseTarget |
| // |
| // Closes the target. If the target is a page that gets closed too. |
| CloseTarget(context.Context, *target.CloseTargetArgs) (*target.CloseTargetReply, error) |
| |
| // Command 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. |
| // |
| // Note: This command is experimental. |
| ExposeDevToolsProtocol(context.Context, *target.ExposeDevToolsProtocolArgs) error |
| |
| // Command CreateBrowserContext |
| // |
| // Creates a new empty BrowserContext. Similar to an incognito profile |
| // but you can have more than one. |
| // |
| // Note: This command is experimental. |
| CreateBrowserContext(context.Context, *target.CreateBrowserContextArgs) (*target.CreateBrowserContextReply, error) |
| |
| // Command GetBrowserContexts |
| // |
| // Returns all browser contexts created with |
| // `Target.createBrowserContext` method. |
| // |
| // Note: This command is experimental. |
| GetBrowserContexts(context.Context) (*target.GetBrowserContextsReply, error) |
| |
| // Command CreateTarget |
| // |
| // Creates a new page. |
| CreateTarget(context.Context, *target.CreateTargetArgs) (*target.CreateTargetReply, error) |
| |
| // Command DetachFromTarget |
| // |
| // Detaches session with given id. |
| DetachFromTarget(context.Context, *target.DetachFromTargetArgs) error |
| |
| // Command DisposeBrowserContext |
| // |
| // Deletes a BrowserContext. All the belonging pages will be closed |
| // without calling their beforeunload hooks. |
| // |
| // Note: This command is experimental. |
| DisposeBrowserContext(context.Context, *target.DisposeBrowserContextArgs) error |
| |
| // Command GetTargetInfo |
| // |
| // Returns information about a target. |
| // |
| // Note: This command is experimental. |
| GetTargetInfo(context.Context, *target.GetTargetInfoArgs) (*target.GetTargetInfoReply, error) |
| |
| // Command GetTargets |
| // |
| // Retrieves a list of available targets. |
| GetTargets(context.Context) (*target.GetTargetsReply, error) |
| |
| // Command SendMessageToTarget |
| // |
| // Deprecated: Sends protocol message over session with given id. |
| // Consider using flat mode instead; see commands attachToTarget, |
| // setAutoAttach, and crbug.com/991325. |
| SendMessageToTarget(context.Context, *target.SendMessageToTargetArgs) error |
| |
| // Command 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. |
| // |
| // Note: This command is experimental. |
| SetAutoAttach(context.Context, *target.SetAutoAttachArgs) error |
| |
| // Command SetDiscoverTargets |
| // |
| // Controls whether to discover available targets and notify via |
| // `targetCreated/targetInfoChanged/targetDestroyed` events. |
| SetDiscoverTargets(context.Context, *target.SetDiscoverTargetsArgs) error |
| |
| // Command SetRemoteLocations |
| // |
| // Enables target discovery for the specified locations, when |
| // `setDiscoverTargets` was set to `true`. |
| // |
| // Note: This command is experimental. |
| SetRemoteLocations(context.Context, *target.SetRemoteLocationsArgs) error |
| |
| // Event AttachedToTarget |
| // |
| // Issued when attached to target because of auto-attach or |
| // `attachToTarget` command. |
| // |
| // Note: This event is experimental. |
| AttachedToTarget(context.Context) (target.AttachedToTargetClient, error) |
| |
| // Event 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. |
| // |
| // Note: This event is experimental. |
| DetachedFromTarget(context.Context) (target.DetachedFromTargetClient, error) |
| |
| // Event ReceivedMessageFromTarget |
| // |
| // Notifies about a new protocol message received from the session (as |
| // reported in `attachedToTarget` event). |
| ReceivedMessageFromTarget(context.Context) (target.ReceivedMessageFromTargetClient, error) |
| |
| // Event TargetCreated |
| // |
| // Issued when a possible inspection target is created. |
| TargetCreated(context.Context) (target.CreatedClient, error) |
| |
| // Event TargetDestroyed |
| // |
| // Issued when a target is destroyed. |
| TargetDestroyed(context.Context) (target.DestroyedClient, error) |
| |
| // Event TargetCrashed |
| // |
| // Issued when a target has crashed. |
| TargetCrashed(context.Context) (target.CrashedClient, error) |
| |
| // Event TargetInfoChanged |
| // |
| // Issued when some information about a target has changed. This only |
| // happens between `targetCreated` and `targetDestroyed`. |
| TargetInfoChanged(context.Context) (target.InfoChangedClient, error) |
| } |
| |
| // The Tethering domain. The Tethering domain defines methods and events for |
| // browser port binding. |
| // |
| // Note: This domain is experimental. |
| type Tethering interface { |
| // Command Bind |
| // |
| // Request browser port binding. |
| Bind(context.Context, *tethering.BindArgs) error |
| |
| // Command Unbind |
| // |
| // Request browser port unbinding. |
| Unbind(context.Context, *tethering.UnbindArgs) error |
| |
| // Event Accepted |
| // |
| // Informs that port was successfully bound and got a specified |
| // connection id. |
| Accepted(context.Context) (tethering.AcceptedClient, error) |
| } |
| |
| // The Tracing domain. |
| // |
| // Note: This domain is experimental. |
| type Tracing interface { |
| // Command End |
| // |
| // Stop trace events collection. |
| End(context.Context) error |
| |
| // Command GetCategories |
| // |
| // Gets supported tracing categories. |
| GetCategories(context.Context) (*tracing.GetCategoriesReply, error) |
| |
| // Command RecordClockSyncMarker |
| // |
| // Record a clock sync marker in the trace. |
| RecordClockSyncMarker(context.Context, *tracing.RecordClockSyncMarkerArgs) error |
| |
| // Command RequestMemoryDump |
| // |
| // Request a global memory dump. |
| RequestMemoryDump(context.Context, *tracing.RequestMemoryDumpArgs) (*tracing.RequestMemoryDumpReply, error) |
| |
| // Command Start |
| // |
| // Start trace events collection. |
| Start(context.Context, *tracing.StartArgs) error |
| |
| // Event BufferUsage |
| BufferUsage(context.Context) (tracing.BufferUsageClient, error) |
| |
| // Event DataCollected |
| // |
| // Contains an bucket of collected trace events. When tracing is |
| // stopped collected events will be send as a sequence of dataCollected |
| // events followed by tracingComplete event. |
| DataCollected(context.Context) (tracing.DataCollectedClient, error) |
| |
| // Event TracingComplete |
| // |
| // Signals that tracing is stopped and there is no trace buffers |
| // pending flush, all data were delivered via dataCollected events. |
| TracingComplete(context.Context) (tracing.CompleteClient, error) |
| } |
| |
| // The WebAudio domain. This domain allows inspection of Web Audio API. |
| // https://webaudio.github.io/web-audio-api/ |
| // |
| // Note: This domain is experimental. |
| type WebAudio interface { |
| // Command Enable |
| // |
| // Enables the WebAudio domain and starts sending context lifetime |
| // events. |
| Enable(context.Context) error |
| |
| // Command Disable |
| // |
| // Disables the WebAudio domain. |
| Disable(context.Context) error |
| |
| // Command GetRealtimeData |
| // |
| // Fetch the realtime data from the registered contexts. |
| GetRealtimeData(context.Context, *webaudio.GetRealtimeDataArgs) (*webaudio.GetRealtimeDataReply, error) |
| |
| // Event ContextCreated |
| // |
| // Notifies that a new BaseAudioContext has been created. |
| ContextCreated(context.Context) (webaudio.ContextCreatedClient, error) |
| |
| // Event ContextWillBeDestroyed |
| // |
| // Notifies that an existing BaseAudioContext will be destroyed. |
| ContextWillBeDestroyed(context.Context) (webaudio.ContextWillBeDestroyedClient, error) |
| |
| // Event ContextChanged |
| // |
| // Notifies that existing BaseAudioContext has changed some properties |
| // (id stays the same).. |
| ContextChanged(context.Context) (webaudio.ContextChangedClient, error) |
| |
| // Event AudioListenerCreated |
| // |
| // Notifies that the construction of an AudioListener has finished. |
| AudioListenerCreated(context.Context) (webaudio.AudioListenerCreatedClient, error) |
| |
| // Event AudioListenerWillBeDestroyed |
| // |
| // Notifies that a new AudioListener has been created. |
| AudioListenerWillBeDestroyed(context.Context) (webaudio.AudioListenerWillBeDestroyedClient, error) |
| |
| // Event AudioNodeCreated |
| // |
| // Notifies that a new AudioNode has been created. |
| AudioNodeCreated(context.Context) (webaudio.AudioNodeCreatedClient, error) |
| |
| // Event AudioNodeWillBeDestroyed |
| // |
| // Notifies that an existing AudioNode has been destroyed. |
| AudioNodeWillBeDestroyed(context.Context) (webaudio.AudioNodeWillBeDestroyedClient, error) |
| |
| // Event AudioParamCreated |
| // |
| // Notifies that a new AudioParam has been created. |
| AudioParamCreated(context.Context) (webaudio.AudioParamCreatedClient, error) |
| |
| // Event AudioParamWillBeDestroyed |
| // |
| // Notifies that an existing AudioParam has been destroyed. |
| AudioParamWillBeDestroyed(context.Context) (webaudio.AudioParamWillBeDestroyedClient, error) |
| |
| // Event NodesConnected |
| // |
| // Notifies that two AudioNodes are connected. |
| NodesConnected(context.Context) (webaudio.NodesConnectedClient, error) |
| |
| // Event NodesDisconnected |
| // |
| // Notifies that AudioNodes are disconnected. The destination can be |
| // null, and it means all the outgoing connections from the source are |
| // disconnected. |
| NodesDisconnected(context.Context) (webaudio.NodesDisconnectedClient, error) |
| |
| // Event NodeParamConnected |
| // |
| // Notifies that an AudioNode is connected to an AudioParam. |
| NodeParamConnected(context.Context) (webaudio.NodeParamConnectedClient, error) |
| |
| // Event NodeParamDisconnected |
| // |
| // Notifies that an AudioNode is disconnected to an AudioParam. |
| NodeParamDisconnected(context.Context) (webaudio.NodeParamDisconnectedClient, error) |
| } |
| |
| // The WebAuthn domain. This domain allows configuring virtual authenticators |
| // to test the WebAuthn API. |
| // |
| // Note: This domain is experimental. |
| type WebAuthn interface { |
| // Command Enable |
| // |
| // Enable the WebAuthn domain and start intercepting credential |
| // storage and retrieval with a virtual authenticator. |
| Enable(context.Context) error |
| |
| // Command Disable |
| // |
| // Disable the WebAuthn domain. |
| Disable(context.Context) error |
| |
| // Command AddVirtualAuthenticator |
| // |
| // Creates and adds a virtual authenticator. |
| AddVirtualAuthenticator(context.Context, *webauthn.AddVirtualAuthenticatorArgs) (*webauthn.AddVirtualAuthenticatorReply, error) |
| |
| // Command RemoveVirtualAuthenticator |
| // |
| // Removes the given authenticator. |
| RemoveVirtualAuthenticator(context.Context, *webauthn.RemoveVirtualAuthenticatorArgs) error |
| |
| // Command AddCredential |
| // |
| // Adds the credential to the specified authenticator. |
| AddCredential(context.Context, *webauthn.AddCredentialArgs) error |
| |
| // Command GetCredential |
| // |
| // Returns a single credential stored in the given virtual |
| // authenticator that matches the credential ID. |
| GetCredential(context.Context, *webauthn.GetCredentialArgs) (*webauthn.GetCredentialReply, error) |
| |
| // Command GetCredentials |
| // |
| // Returns all the credentials stored in the given virtual |
| // authenticator. |
| GetCredentials(context.Context, *webauthn.GetCredentialsArgs) (*webauthn.GetCredentialsReply, error) |
| |
| // Command RemoveCredential |
| // |
| // Removes a credential from the authenticator. |
| RemoveCredential(context.Context, *webauthn.RemoveCredentialArgs) error |
| |
| // Command ClearCredentials |
| // |
| // Clears all the credentials from the specified device. |
| ClearCredentials(context.Context, *webauthn.ClearCredentialsArgs) error |
| |
| // Command SetUserVerified |
| // |
| // Sets whether User Verification succeeds or fails for an |
| // authenticator. The default is true. |
| SetUserVerified(context.Context, *webauthn.SetUserVerifiedArgs) error |
| } |