Documentation ¶
Overview ¶
Package domain helps executing cdproto commands.
Index ¶
- type Accessibility
- func (doAccessibility Accessibility) Disable() (err error)
- func (doAccessibility Accessibility) Enable() (err error)
- func (doAccessibility Accessibility) GetFullAXTree() (retNodes []*accessibility.Node, err error)
- func (doAccessibility Accessibility) GetPartialAXTree(nodeID *cdp.NodeID, backendNodeID *cdp.BackendNodeID, ...) (retNodes []*accessibility.Node, err error)
- type Animation
- func (doAnimation Animation) Disable() (err error)
- func (doAnimation Animation) Enable() (err error)
- func (doAnimation Animation) GetCurrentTime(id string) (retCurrentTime float64, err error)
- func (doAnimation Animation) GetPlaybackRate() (retPlaybackRate float64, err error)
- func (doAnimation Animation) ReleaseAnimations(animations []string) (err error)
- func (doAnimation Animation) ResolveAnimation(animationID string) (retRemoteObject *runtime.RemoteObject, err error)
- func (doAnimation Animation) SeekAnimations(animations []string, currentTime float64) (err error)
- func (doAnimation Animation) SetPaused(animations []string, paused bool) (err error)
- func (doAnimation Animation) SetPlaybackRate(playbackRate float64) (err error)
- func (doAnimation Animation) SetTiming(animationID string, duration float64, delay float64) (err error)
- type ApplicationCache
- func (doApplicationCache ApplicationCache) Enable() (err error)
- func (doApplicationCache ApplicationCache) GetApplicationCacheForFrame(frameID cdp.FrameID) (retApplicationCache *applicationcache.ApplicationCache, err error)
- func (doApplicationCache ApplicationCache) GetFramesWithManifests() (retFrameIds []*applicationcache.FrameWithManifest, err error)
- func (doApplicationCache ApplicationCache) GetManifestForFrame(frameID cdp.FrameID) (retManifestURL string, err error)
- type Audits
- type BackgroundService
- func (doBackgroundService BackgroundService) ClearEvents(service backgroundservice.ServiceName) (err error)
- func (doBackgroundService BackgroundService) SetRecording(shouldRecord bool, service backgroundservice.ServiceName) (err error)
- func (doBackgroundService BackgroundService) StartObserving(service backgroundservice.ServiceName) (err error)
- func (doBackgroundService BackgroundService) StopObserving(service backgroundservice.ServiceName) (err error)
- type Browser
- func (doBrowser Browser) Close() (err error)
- func (doBrowser Browser) Crash() (err error)
- func (doBrowser Browser) CrashGpuProcess() (err error)
- func (doBrowser Browser) GetBrowserCommandLine() (retArguments []string, err error)
- func (doBrowser Browser) GetHistogram(name string, delta *bool) (retHistogram *browser.Histogram, err error)
- func (doBrowser Browser) GetHistograms(query *string, delta *bool) (retHistograms []*browser.Histogram, err error)
- func (doBrowser Browser) GetVersion() (retProtocolVersion string, retProduct string, retRevision string, ...)
- func (doBrowser Browser) GetWindowBounds(windowID browser.WindowID) (retBounds *browser.Bounds, err error)
- func (doBrowser Browser) GetWindowForTarget(targetID *target.ID) (retWindowID browser.WindowID, retBounds *browser.Bounds, err error)
- func (doBrowser Browser) GrantPermissions(origin string, permissions []browser.PermissionType, ...) (err error)
- func (doBrowser Browser) ResetPermissions(browserContextID *cdp.BrowserContextID) (err error)
- func (doBrowser Browser) SetDockTile(badgeLabel *string, image *string) (err error)
- func (doBrowser Browser) SetPermission(origin string, permission *browser.PermissionDescriptor, ...) (err error)
- func (doBrowser Browser) SetWindowBounds(windowID browser.WindowID, bounds *browser.Bounds) (err error)
- type CSS
- func (doCSS CSS) AddRule(styleSheetID css.StyleSheetID, ruleText string, location *css.SourceRange) (retRule *css.Rule, err error)
- func (doCSS CSS) CollectClassNames(styleSheetID css.StyleSheetID) (retClassNames []string, err error)
- func (doCSS CSS) CreateStyleSheet(frameID cdp.FrameID) (retStyleSheetID css.StyleSheetID, err error)
- func (doCSS CSS) Disable() (err error)
- func (doCSS CSS) Enable() (err error)
- func (doCSS CSS) ForcePseudoState(nodeID cdp.NodeID, forcedPseudoClasses []string) (err error)
- func (doCSS CSS) GetBackgroundColors(nodeID cdp.NodeID) (retBackgroundColors []string, retComputedFontSize string, ...)
- func (doCSS CSS) GetComputedStyleForNode(nodeID cdp.NodeID) (retComputedStyle []*css.ComputedStyleProperty, err error)
- func (doCSS CSS) GetInlineStylesForNode(nodeID cdp.NodeID) (retInlineStyle *css.Style, retAttributesStyle *css.Style, err error)
- func (doCSS CSS) GetMatchedStylesForNode(nodeID cdp.NodeID) (retInlineStyle *css.Style, retAttributesStyle *css.Style, ...)
- func (doCSS CSS) GetMediaQueries() (retMedias []*css.Media, err error)
- func (doCSS CSS) GetPlatformFontsForNode(nodeID cdp.NodeID) (retFonts []*css.PlatformFontUsage, err error)
- func (doCSS CSS) GetStyleSheetText(styleSheetID css.StyleSheetID) (retText string, err error)
- func (doCSS CSS) SetEffectivePropertyValueForNode(nodeID cdp.NodeID, propertyName string, value string) (err error)
- func (doCSS CSS) SetKeyframeKey(styleSheetID css.StyleSheetID, rangeVal *css.SourceRange, keyText string) (retKeyText *css.Value, err error)
- func (doCSS CSS) SetMediaText(styleSheetID css.StyleSheetID, rangeVal *css.SourceRange, text string) (retMedia *css.Media, err error)
- func (doCSS CSS) SetRuleSelector(styleSheetID css.StyleSheetID, rangeVal *css.SourceRange, selector string) (retSelectorList *css.SelectorList, err error)
- func (doCSS CSS) SetStyleSheetText(styleSheetID css.StyleSheetID, text string) (retSourceMapURL string, err error)
- func (doCSS CSS) SetStyleTexts(edits []*css.StyleDeclarationEdit) (retStyles []*css.Style, err error)
- func (doCSS CSS) StartRuleUsageTracking() (err error)
- func (doCSS CSS) StopRuleUsageTracking() (retRuleUsage []*css.RuleUsage, err error)
- func (doCSS CSS) TakeCoverageDelta() (retCoverage []*css.RuleUsage, retTimestamp float64, err error)
- type CacheStorage
- func (doCacheStorage CacheStorage) DeleteCache(cacheID cachestorage.CacheID) (err error)
- func (doCacheStorage CacheStorage) DeleteEntry(cacheID cachestorage.CacheID, request string) (err error)
- func (doCacheStorage CacheStorage) RequestCacheNames(securityOrigin string) (retCaches []*cachestorage.Cache, err error)
- func (doCacheStorage CacheStorage) RequestCachedResponse(cacheID cachestorage.CacheID, requestURL string, ...) (retResponse *cachestorage.CachedResponse, err error)
- func (doCacheStorage CacheStorage) RequestEntries(cacheID cachestorage.CacheID, skipCount *int64, pageSize *int64, ...) (retCacheDataEntries []*cachestorage.DataEntry, retReturnCount float64, ...)
- type Cast
- type DOM
- func (doDOM DOM) CollectClassNamesFromSubtree(nodeID cdp.NodeID) (retClassNames []string, err error)
- func (doDOM DOM) CopyTo(nodeID cdp.NodeID, targetNodeID cdp.NodeID, insertBeforeNodeID *cdp.NodeID) (retNodeID cdp.NodeID, err error)
- func (doDOM DOM) DescribeNode(nodeID *cdp.NodeID, backendNodeID *cdp.BackendNodeID, ...) (retNode *cdp.Node, err error)
- func (doDOM DOM) Disable() (err error)
- func (doDOM DOM) DiscardSearchResults(searchID string) (err error)
- func (doDOM DOM) Enable() (err error)
- func (doDOM DOM) Focus(nodeID *cdp.NodeID, backendNodeID *cdp.BackendNodeID, ...) (err error)
- func (doDOM DOM) GetAttributes(nodeID cdp.NodeID) (retAttributes []string, err error)
- func (doDOM DOM) GetBoxModel(nodeID *cdp.NodeID, backendNodeID *cdp.BackendNodeID, ...) (retModel *dom.BoxModel, err error)
- func (doDOM DOM) GetContentQuads(nodeID *cdp.NodeID, backendNodeID *cdp.BackendNodeID, ...) (retQuads []dom.Quad, err error)
- func (doDOM DOM) GetDocument(depth *int64, pierce *bool) (retRoot *cdp.Node, err error)
- func (doDOM DOM) GetFileInfo(objectID runtime.RemoteObjectID) (retPath string, err error)
- func (doDOM DOM) GetFlattenedDocument(depth *int64, pierce *bool) (retNodes []*cdp.Node, err error)
- func (doDOM DOM) GetFrameOwner(frameID cdp.FrameID) (retBackendNodeID cdp.BackendNodeID, retNodeID cdp.NodeID, err error)
- func (doDOM DOM) GetNodeForLocation(x int64, y int64, includeUserAgentShadowDOM *bool, ...) (retBackendNodeID cdp.BackendNodeID, retFrameID cdp.FrameID, ...)
- func (doDOM DOM) GetNodeStackTraces(nodeID cdp.NodeID) (retCreation *runtime.StackTrace, err error)
- func (doDOM DOM) GetOuterHTML(nodeID *cdp.NodeID, backendNodeID *cdp.BackendNodeID, ...) (retOuterHTML string, err error)
- func (doDOM DOM) GetRelayoutBoundary(nodeID cdp.NodeID) (retNodeID cdp.NodeID, err error)
- func (doDOM DOM) GetSearchResults(searchID string, fromIndex int64, toIndex int64) (retNodeIds []cdp.NodeID, err error)
- func (doDOM DOM) MarkUndoableState() (err error)
- func (doDOM DOM) MoveTo(nodeID cdp.NodeID, targetNodeID cdp.NodeID, insertBeforeNodeID *cdp.NodeID) (retNodeID cdp.NodeID, err error)
- func (doDOM DOM) PerformSearch(query string, includeUserAgentShadowDOM *bool) (retSearchID string, retResultCount int64, err error)
- func (doDOM DOM) PushNodeByPathToFrontend(path string) (retNodeID cdp.NodeID, err error)
- func (doDOM DOM) PushNodesByBackendIdsToFrontend(backendNodeIds []cdp.BackendNodeID) (retNodeIds []cdp.NodeID, err error)
- func (doDOM DOM) QuerySelector(nodeID cdp.NodeID, selector string) (retNodeID cdp.NodeID, err error)
- func (doDOM DOM) QuerySelectorAll(nodeID cdp.NodeID, selector string) (retNodeIds []cdp.NodeID, err error)
- func (doDOM DOM) Redo() (err error)
- func (doDOM DOM) RemoveAttribute(nodeID cdp.NodeID, name string) (err error)
- func (doDOM DOM) RemoveNode(nodeID cdp.NodeID) (err error)
- func (doDOM DOM) RequestChildNodes(nodeID cdp.NodeID, depth *int64, pierce *bool) (err error)
- func (doDOM DOM) RequestNode(objectID runtime.RemoteObjectID) (retNodeID cdp.NodeID, err error)
- func (doDOM DOM) ResolveNode(nodeID *cdp.NodeID, backendNodeID *cdp.BackendNodeID, objectGroup *string, ...) (retObject *runtime.RemoteObject, err error)
- func (doDOM DOM) SetAttributeValue(nodeID cdp.NodeID, name string, value string) (err error)
- func (doDOM DOM) SetAttributesAsText(nodeID cdp.NodeID, text string, name *string) (err error)
- func (doDOM DOM) SetFileInputFiles(files []string, nodeID *cdp.NodeID, backendNodeID *cdp.BackendNodeID, ...) (err error)
- func (doDOM DOM) SetInspectedNode(nodeID cdp.NodeID) (err error)
- func (doDOM DOM) SetNodeName(nodeID cdp.NodeID, name string) (retNodeID cdp.NodeID, err error)
- func (doDOM DOM) SetNodeStackTracesEnabled(enable bool) (err error)
- func (doDOM DOM) SetNodeValue(nodeID cdp.NodeID, value string) (err error)
- func (doDOM DOM) SetOuterHTML(nodeID cdp.NodeID, outerHTML string) (err error)
- func (doDOM DOM) Undo() (err error)
- type DOMDebugger
- func (doDOMDebugger DOMDebugger) GetEventListeners(objectID runtime.RemoteObjectID, depth *int64, pierce *bool) (retListeners []*domdebugger.EventListener, err error)
- func (doDOMDebugger DOMDebugger) RemoveDOMBreakpoint(nodeID cdp.NodeID, typeVal domdebugger.DOMBreakpointType) (err error)
- func (doDOMDebugger DOMDebugger) RemoveEventListenerBreakpoint(eventName string, targetName *string) (err error)
- func (doDOMDebugger DOMDebugger) RemoveInstrumentationBreakpoint(eventName string) (err error)
- func (doDOMDebugger DOMDebugger) RemoveXHRBreakpoint(url string) (err error)
- func (doDOMDebugger DOMDebugger) SetDOMBreakpoint(nodeID cdp.NodeID, typeVal domdebugger.DOMBreakpointType) (err error)
- func (doDOMDebugger DOMDebugger) SetEventListenerBreakpoint(eventName string, targetName *string) (err error)
- func (doDOMDebugger DOMDebugger) SetInstrumentationBreakpoint(eventName string) (err error)
- func (doDOMDebugger DOMDebugger) SetXHRBreakpoint(url string) (err error)
- type DOMSnapshot
- func (doDOMSnapshot DOMSnapshot) CaptureSnapshot(computedStyles []string, includePaintOrder *bool, includeDOMRects *bool) (retDocuments []*domsnapshot.DocumentSnapshot, retStrings []string, err error)
- func (doDOMSnapshot DOMSnapshot) Disable() (err error)
- func (doDOMSnapshot DOMSnapshot) Enable() (err error)
- type DOMStorage
- func (doDOMStorage DOMStorage) Clear(storageID *domstorage.StorageID) (err error)
- func (doDOMStorage DOMStorage) Disable() (err error)
- func (doDOMStorage DOMStorage) Enable() (err error)
- func (doDOMStorage DOMStorage) GetDOMStorageItems(storageID *domstorage.StorageID) (retEntries []domstorage.Item, err error)
- func (doDOMStorage DOMStorage) RemoveDOMStorageItem(storageID *domstorage.StorageID, key string) (err error)
- func (doDOMStorage DOMStorage) SetDOMStorageItem(storageID *domstorage.StorageID, key string, value string) (err error)
- type Database
- func (doDatabase Database) Disable() (err error)
- func (doDatabase Database) Enable() (err error)
- func (doDatabase Database) ExecuteSQL(databaseID database.ID, query string) (retColumnNames []string, retValues []easyjson.RawMessage, ...)
- func (doDatabase Database) GetDatabaseTableNames(databaseID database.ID) (retTableNames []string, err error)
- type Debugger
- func (doDebugger Debugger) ContinueToLocation(location *debugger.Location, ...) (err error)
- func (doDebugger Debugger) Disable() (err error)
- func (doDebugger Debugger) Enable(maxScriptsCacheSize *float64) (retDebuggerID runtime.UniqueDebuggerID, err error)
- func (doDebugger Debugger) EvaluateOnCallFrame(callFrameID debugger.CallFrameID, expression string, objectGroup *string, ...) (retResult *runtime.RemoteObject, retExceptionDetails *runtime.ExceptionDetails, ...)
- func (doDebugger Debugger) GetPossibleBreakpoints(start *debugger.Location, end *debugger.Location, restrictToFunction *bool) (retLocations []*debugger.BreakLocation, err error)
- func (doDebugger Debugger) GetScriptSource(scriptID runtime.ScriptID) (retScriptSource string, retBytecode []byte, err error)
- func (doDebugger Debugger) GetStackTrace(stackTraceID *runtime.StackTraceID) (retStackTrace *runtime.StackTrace, err error)
- func (doDebugger Debugger) Pause() (err error)
- func (doDebugger Debugger) RemoveBreakpoint(breakpointID debugger.BreakpointID) (err error)
- func (doDebugger Debugger) RestartFrame(callFrameID debugger.CallFrameID) (retCallFrames []*debugger.CallFrame, retAsyncStackTrace *runtime.StackTrace, ...)
- func (doDebugger Debugger) Resume() (err error)
- func (doDebugger Debugger) SearchInContent(scriptID runtime.ScriptID, query string, caseSensitive *bool, isRegex *bool) (retResult []*debugger.SearchMatch, err error)
- func (doDebugger Debugger) SetAsyncCallStackDepth(maxDepth int64) (err error)
- func (doDebugger Debugger) SetBlackboxPatterns(patterns []string) (err error)
- func (doDebugger Debugger) SetBlackboxedRanges(scriptID runtime.ScriptID, positions []*debugger.ScriptPosition) (err error)
- func (doDebugger Debugger) SetBreakpoint(location *debugger.Location, condition *string) (retBreakpointID debugger.BreakpointID, retActualLocation *debugger.Location, ...)
- func (doDebugger Debugger) SetBreakpointByURL(lineNumber int64, url *string, urlRegex *string, scriptHash *string, ...) (retBreakpointID debugger.BreakpointID, retLocations []*debugger.Location, ...)
- func (doDebugger Debugger) SetBreakpointOnFunctionCall(objectID runtime.RemoteObjectID, condition *string) (retBreakpointID debugger.BreakpointID, err error)
- func (doDebugger Debugger) SetBreakpointsActive(active bool) (err error)
- func (doDebugger Debugger) SetInstrumentationBreakpoint(instrumentation debugger.SetInstrumentationBreakpointInstrumentation) (retBreakpointID debugger.BreakpointID, err error)
- func (doDebugger Debugger) SetPauseOnExceptions(state debugger.ExceptionsState) (err error)
- func (doDebugger Debugger) SetReturnValue(newValue *runtime.CallArgument) (err error)
- func (doDebugger Debugger) SetScriptSource(scriptID runtime.ScriptID, scriptSource string, dryRun *bool) (retCallFrames []*debugger.CallFrame, retStackChanged bool, ...)
- func (doDebugger Debugger) SetSkipAllPauses(skip bool) (err error)
- func (doDebugger Debugger) SetVariableValue(scopeNumber int64, variableName string, newValue *runtime.CallArgument, ...) (err error)
- func (doDebugger Debugger) StepInto(breakOnAsyncCall *bool) (err error)
- func (doDebugger Debugger) StepOut() (err error)
- func (doDebugger Debugger) StepOver() (err error)
- type DeviceOrientation
- type Domain
- func (d Domain) Accessibility() Accessibility
- func (d Domain) Animation() Animation
- func (d Domain) ApplicationCache() ApplicationCache
- func (d Domain) Audits() Audits
- func (d Domain) BackgroundService() BackgroundService
- func (d Domain) Browser() Browser
- func (d Domain) CSS() CSS
- func (d Domain) CacheStorage() CacheStorage
- func (d Domain) Cast() Cast
- func (d Domain) DOM() DOM
- func (d Domain) DOMDebugger() DOMDebugger
- func (d Domain) DOMSnapshot() DOMSnapshot
- func (d Domain) DOMStorage() DOMStorage
- func (d Domain) Database() Database
- func (d Domain) Debugger() Debugger
- func (d Domain) DeviceOrientation() DeviceOrientation
- func (d Domain) Emulation() Emulation
- func (d Domain) Fetch() Fetch
- func (d Domain) HAR() HAR
- func (d Domain) HeadlessExperimental() HeadlessExperimental
- func (d Domain) HeapProfiler() HeapProfiler
- func (d Domain) IO() IO
- func (d Domain) IndexedDB() IndexedDB
- func (d Domain) Input() Input
- func (d Domain) Inspector() Inspector
- func (d Domain) LayerTree() LayerTree
- func (d Domain) Log() Log
- func (d Domain) Media() Media
- func (d Domain) Memory() Memory
- func (d Domain) Network() Network
- func (d Domain) Overlay() Overlay
- func (d Domain) Page() Page
- func (d Domain) Performance() Performance
- func (d Domain) Profiler() Profiler
- func (d Domain) Runtime() Runtime
- func (d Domain) Security() Security
- func (d Domain) ServiceWorker() ServiceWorker
- func (d Domain) Storage() Storage
- func (d Domain) SystemInfo() SystemInfo
- func (d Domain) Target() Target
- func (d Domain) Tethering() Tethering
- func (d Domain) Tracing() Tracing
- func (d Domain) WebAudio() WebAudio
- func (d Domain) WebAuthn() WebAuthn
- type Emulation
- func (doEmulation Emulation) CanEmulate() (retResult bool, err error)
- func (doEmulation Emulation) ClearDeviceMetricsOverride() (err error)
- func (doEmulation Emulation) ClearGeolocationOverride() (err error)
- func (doEmulation Emulation) ResetPageScaleFactor() (err error)
- func (doEmulation Emulation) SetCPUThrottlingRate(rate float64) (err error)
- func (doEmulation Emulation) SetDefaultBackgroundColorOverride(color *cdp.RGBA) (err error)
- func (doEmulation Emulation) SetDeviceMetricsOverride(width int64, height int64, deviceScaleFactor float64, mobile bool, ...) (err error)
- func (doEmulation Emulation) SetDocumentCookieDisabled(disabled bool) (err error)
- func (doEmulation Emulation) SetEmitTouchEventsForMouse(enabled bool, configuration *emulation.SetEmitTouchEventsForMouseConfiguration) (err error)
- func (doEmulation Emulation) SetEmulatedMedia(media *string, features []*emulation.MediaFeature) (err error)
- func (doEmulation Emulation) SetFocusEmulationEnabled(enabled bool) (err error)
- func (doEmulation Emulation) SetGeolocationOverride(latitude *float64, longitude *float64, accuracy *float64) (err error)
- func (doEmulation Emulation) SetPageScaleFactor(pageScaleFactor float64) (err error)
- func (doEmulation Emulation) SetScriptExecutionDisabled(value bool) (err error)
- func (doEmulation Emulation) SetScrollbarsHidden(hidden bool) (err error)
- func (doEmulation Emulation) SetTimezoneOverride(timezoneID string) (err error)
- func (doEmulation Emulation) SetTouchEmulationEnabled(enabled bool, maxTouchPoints *int64) (err error)
- func (doEmulation Emulation) SetUserAgentOverride(userAgent string, acceptLanguage *string, platform *string) (err error)
- func (doEmulation Emulation) SetVirtualTimePolicy(policy emulation.VirtualTimePolicy, budget *float64, ...) (retVirtualTimeTicksBase float64, err error)
- type Fetch
- func (doFetch Fetch) ContinueRequest(requestID fetch.RequestID, url *string, method *string, postData *string, ...) (err error)
- func (doFetch Fetch) ContinueWithAuth(requestID fetch.RequestID, authChallengeResponse *fetch.AuthChallengeResponse) (err error)
- func (doFetch Fetch) Disable() (err error)
- func (doFetch Fetch) Enable(patterns []*fetch.RequestPattern, handleAuthRequests *bool) (err error)
- func (doFetch Fetch) FailRequest(requestID fetch.RequestID, errorReason network.ErrorReason) (err error)
- func (doFetch Fetch) FulfillRequest(requestID fetch.RequestID, responseCode int64, ...) (err error)
- func (doFetch Fetch) GetResponseBody(requestID fetch.RequestID) (retBody []byte, err error)
- func (doFetch Fetch) TakeResponseBodyAsStream(requestID fetch.RequestID) (retStream io.StreamHandle, err error)
- type HAR
- type HeadlessExperimental
- func (doHeadlessExperimental HeadlessExperimental) BeginFrame(frameTimeTicks *float64, interval *float64, noDisplayUpdates *bool, ...) (retHasDamage bool, retScreenshotData []byte, err error)
- func (doHeadlessExperimental HeadlessExperimental) Disable() (err error)
- func (doHeadlessExperimental HeadlessExperimental) Enable() (err error)
- type HeapProfiler
- func (doHeapProfiler HeapProfiler) AddInspectedHeapObject(heapObjectID heapprofiler.HeapSnapshotObjectID) (err error)
- func (doHeapProfiler HeapProfiler) CollectGarbage() (err error)
- func (doHeapProfiler HeapProfiler) Disable() (err error)
- func (doHeapProfiler HeapProfiler) Enable() (err error)
- func (doHeapProfiler HeapProfiler) GetHeapObjectID(objectID runtime.RemoteObjectID) (retHeapSnapshotObjectID heapprofiler.HeapSnapshotObjectID, err error)
- func (doHeapProfiler HeapProfiler) GetObjectByHeapObjectID(objectID heapprofiler.HeapSnapshotObjectID, objectGroup *string) (retResult *runtime.RemoteObject, err error)
- func (doHeapProfiler HeapProfiler) GetSamplingProfile() (retProfile *heapprofiler.SamplingHeapProfile, err error)
- func (doHeapProfiler HeapProfiler) StartSampling(samplingInterval *float64) (err error)
- func (doHeapProfiler HeapProfiler) StartTrackingHeapObjects(trackAllocations *bool) (err error)
- func (doHeapProfiler HeapProfiler) StopSampling() (retProfile *heapprofiler.SamplingHeapProfile, err error)
- func (doHeapProfiler HeapProfiler) StopTrackingHeapObjects(reportProgress *bool, treatGlobalObjectsAsRoots *bool) (err error)
- func (doHeapProfiler HeapProfiler) TakeHeapSnapshot(reportProgress *bool, treatGlobalObjectsAsRoots *bool) (err error)
- type IO
- type IndexedDB
- func (doIndexedDB IndexedDB) ClearObjectStore(securityOrigin string, databaseName string, objectStoreName string) (err error)
- func (doIndexedDB IndexedDB) DeleteDatabase(securityOrigin string, databaseName string) (err error)
- func (doIndexedDB IndexedDB) DeleteObjectStoreEntries(securityOrigin string, databaseName string, objectStoreName string, ...) (err error)
- func (doIndexedDB IndexedDB) Disable() (err error)
- func (doIndexedDB IndexedDB) Enable() (err error)
- func (doIndexedDB IndexedDB) GetMetadata(securityOrigin string, databaseName string, objectStoreName string) (retEntriesCount float64, retKeyGeneratorValue float64, err error)
- func (doIndexedDB IndexedDB) RequestData(securityOrigin string, databaseName string, objectStoreName string, ...) (retObjectStoreDataEntries []*indexeddb.DataEntry, retHasMore bool, err error)
- func (doIndexedDB IndexedDB) RequestDatabase(securityOrigin string, databaseName string) (retDatabaseWithObjectStores *indexeddb.DatabaseWithObjectStores, err error)
- func (doIndexedDB IndexedDB) RequestDatabaseNames(securityOrigin string) (retDatabaseNames []string, err error)
- type Input
- func (doInput Input) DispatchKeyEvent(typeVal input.KeyType, modifiers *input.Modifier, ...) (err error)
- func (doInput Input) DispatchMouseEvent(typeVal input.MouseType, x float64, y float64, modifiers *input.Modifier, ...) (err error)
- func (doInput Input) DispatchTouchEvent(typeVal input.TouchType, touchPoints []*input.TouchPoint, ...) (err error)
- func (doInput Input) EmulateTouchFromMouseEvent(typeVal input.MouseType, x int64, y int64, button input.MouseButton, ...) (err error)
- func (doInput Input) InsertText(text string) (err error)
- func (doInput Input) SetIgnoreInputEvents(ignore bool) (err error)
- func (doInput Input) SynthesizePinchGesture(x float64, y float64, scaleFactor float64, relativeSpeed *int64, ...) (err error)
- func (doInput Input) SynthesizeScrollGesture(x float64, y float64, xDistance *float64, yDistance *float64, ...) (err error)
- func (doInput Input) SynthesizeTapGesture(x float64, y float64, duration *int64, tapCount *int64, ...) (err error)
- type Inspector
- type LayerTree
- func (doLayerTree LayerTree) CompositingReasons(layerID layertree.LayerID) (retCompositingReasonIds []string, err error)
- func (doLayerTree LayerTree) Disable() (err error)
- func (doLayerTree LayerTree) Enable() (err error)
- func (doLayerTree LayerTree) LoadSnapshot(tiles []*layertree.PictureTile) (retSnapshotID layertree.SnapshotID, err error)
- func (doLayerTree LayerTree) MakeSnapshot(layerID layertree.LayerID) (retSnapshotID layertree.SnapshotID, err error)
- func (doLayerTree LayerTree) ProfileSnapshot(snapshotID layertree.SnapshotID, minRepeatCount *int64, minDuration *float64, ...) (retTimings []layertree.PaintProfile, err error)
- func (doLayerTree LayerTree) ReleaseSnapshot(snapshotID layertree.SnapshotID) (err error)
- func (doLayerTree LayerTree) ReplaySnapshot(snapshotID layertree.SnapshotID, fromStep *int64, toStep *int64, ...) (retDataURL string, err error)
- func (doLayerTree LayerTree) SnapshotCommandLog(snapshotID layertree.SnapshotID) (retCommandLog []easyjson.RawMessage, err error)
- type Log
- type Media
- type Memory
- func (doMemory Memory) ForciblyPurgeJavaScriptMemory() (err error)
- func (doMemory Memory) GetAllTimeSamplingProfile() (retProfile *memory.SamplingProfile, err error)
- func (doMemory Memory) GetBrowserSamplingProfile() (retProfile *memory.SamplingProfile, err error)
- func (doMemory Memory) GetDOMCounters() (retDocuments int64, retNodes int64, retJsEventListeners int64, err error)
- func (doMemory Memory) GetSamplingProfile() (retProfile *memory.SamplingProfile, err error)
- func (doMemory Memory) PrepareForLeakDetection() (err error)
- func (doMemory Memory) SetPressureNotificationsSuppressed(suppressed bool) (err error)
- func (doMemory Memory) SimulatePressureNotification(level memory.PressureLevel) (err error)
- func (doMemory Memory) StartSampling(samplingInterval *int64, suppressRandomness *bool) (err error)
- func (doMemory Memory) StopSampling() (err error)
- type Network
- func (doNetwork Network) ClearBrowserCache() (err error)
- func (doNetwork Network) ClearBrowserCookies() (err error)
- func (doNetwork Network) DeleteCookies(name string, url *string, domain *string, path *string) (err error)
- func (doNetwork Network) Disable() (err error)
- func (doNetwork Network) EmulateNetworkConditions(offline bool, latency float64, downloadThroughput float64, ...) (err error)
- func (doNetwork Network) Enable(maxTotalBufferSize *int64, maxResourceBufferSize *int64, ...) (err error)
- func (doNetwork Network) GetAllCookies() (retCookies []*network.Cookie, err error)
- func (doNetwork Network) GetCertificate(origin string) (retTableNames []string, err error)
- func (doNetwork Network) GetCookies(urls []string) (retCookies []*network.Cookie, err error)
- func (doNetwork Network) GetRequestPostData(requestID network.RequestID) (retPostData string, err error)
- func (doNetwork Network) GetResponseBody(requestID network.RequestID) (retBody []byte, err error)
- func (doNetwork Network) GetResponseBodyForInterception(interceptionID network.InterceptionID) (retBody []byte, err error)
- func (doNetwork Network) ReplayXHR(requestID network.RequestID) (err error)
- func (doNetwork Network) SearchInResponseBody(requestID network.RequestID, query string, caseSensitive *bool, isRegex *bool) (retResult []*debugger.SearchMatch, err error)
- func (doNetwork Network) SetBlockedURLS(urls []string) (err error)
- func (doNetwork Network) SetBypassServiceWorker(bypass bool) (err error)
- func (doNetwork Network) SetCacheDisabled(cacheDisabled bool) (err error)
- func (doNetwork Network) SetCookie(name string, value string, url *string, domain *string, path *string, ...) (retSuccess bool, err error)
- func (doNetwork Network) SetCookies(cookies []*network.CookieParam) (err error)
- func (doNetwork Network) SetDataSizeLimitsForTest(maxTotalSize int64, maxResourceSize int64) (err error)
- func (doNetwork Network) SetExtraHTTPHeaders(headers network.Headers) (err error)
- func (doNetwork Network) TakeResponseBodyForInterceptionAsStream(interceptionID network.InterceptionID) (retStream io.StreamHandle, err error)
- type Overlay
- func (doOverlay Overlay) Disable() (err error)
- func (doOverlay Overlay) Enable() (err error)
- func (doOverlay Overlay) GetHighlightObjectForTest(nodeID cdp.NodeID, includeDistance *bool, includeStyle *bool) (retHighlight easyjson.RawMessage, err error)
- func (doOverlay Overlay) HideHighlight() (err error)
- func (doOverlay Overlay) HighlightFrame(frameID cdp.FrameID, contentColor *cdp.RGBA, contentOutlineColor *cdp.RGBA) (err error)
- func (doOverlay Overlay) HighlightNode(highlightConfig *overlay.HighlightConfig, nodeID *cdp.NodeID, ...) (err error)
- func (doOverlay Overlay) HighlightQuad(quad dom.Quad, color *cdp.RGBA, outlineColor *cdp.RGBA) (err error)
- func (doOverlay Overlay) HighlightRect(x int64, y int64, width int64, height int64, color *cdp.RGBA, ...) (err error)
- func (doOverlay Overlay) SetInspectMode(mode overlay.InspectMode, highlightConfig *overlay.HighlightConfig) (err error)
- func (doOverlay Overlay) SetPausedInDebuggerMessage(message *string) (err error)
- func (doOverlay Overlay) SetShowAdHighlights(show bool) (err error)
- func (doOverlay Overlay) SetShowDebugBorders(show bool) (err error)
- func (doOverlay Overlay) SetShowFPSCounter(show bool) (err error)
- func (doOverlay Overlay) SetShowHitTestBorders(show bool) (err error)
- func (doOverlay Overlay) SetShowLayoutShiftRegions(result bool) (err error)
- func (doOverlay Overlay) SetShowPaintRects(result bool) (err error)
- func (doOverlay Overlay) SetShowScrollBottleneckRects(show bool) (err error)
- func (doOverlay Overlay) SetShowViewportSizeOnResize(show bool) (err error)
- type Page
- func (doPage Page) AddCompilationCache(url string, data string) (err error)
- func (doPage Page) AddScriptToEvaluateOnNewDocument(source string, worldName *string) (retIdentifier page.ScriptIdentifier, err error)
- func (doPage Page) BringToFront() (err error)
- func (doPage Page) CaptureScreenshot(format *page.CaptureScreenshotFormat, quality *int64, clip *page.Viewport, ...) (retData []byte, err error)
- func (doPage Page) CaptureSnapshot(format *page.CaptureSnapshotFormat) (retData string, err error)
- func (doPage Page) ClearCompilationCache() (err error)
- func (doPage Page) Close() (err error)
- func (doPage Page) Crash() (err error)
- func (doPage Page) CreateIsolatedWorld(frameID cdp.FrameID, worldName *string, grantUniveralAccess *bool) (retExecutionContextID runtime.ExecutionContextID, err error)
- func (doPage Page) Disable() (err error)
- func (doPage Page) Enable() (err error)
- func (doPage Page) GenerateTestReport(message string, group *string) (err error)
- func (doPage Page) GetAppManifest() (retURL string, retErrors []*page.AppManifestError, retData string, ...)
- func (doPage Page) GetFrameTree() (retFrameTree *page.FrameTree, err error)
- func (doPage Page) GetInstallabilityErrors() (retInstallabilityErrors []*page.InstallabilityError, err error)
- func (doPage Page) GetLayoutMetrics() (retLayoutViewport *page.LayoutViewport, retVisualViewport *page.VisualViewport, ...)
- func (doPage Page) GetManifestIcons() (retPrimaryIcon []byte, err error)
- func (doPage Page) GetNavigationHistory() (retCurrentIndex int64, retEntries []*page.NavigationEntry, err error)
- func (doPage Page) GetResourceContent(frameID cdp.FrameID, url string) (retContent []byte, err error)
- func (doPage Page) GetResourceTree() (retFrameTree *page.FrameResourceTree, err error)
- func (doPage Page) HandleJavaScriptDialog(accept bool, promptText *string) (err error)
- func (doPage Page) Navigate(url string, referrer *string, transitionType *page.TransitionType, ...) (retFrameID cdp.FrameID, retLoaderID cdp.LoaderID, retErrorText string, ...)
- func (doPage Page) NavigateToHistoryEntry(entryID int64) (err error)
- func (doPage Page) PrintToPDF(landscape *bool, displayHeaderFooter *bool, printBackground *bool, ...) (retData []byte, retStream io.StreamHandle, err error)
- func (doPage Page) Reload(ignoreCache *bool, scriptToEvaluateOnLoad *string) (err error)
- func (doPage Page) RemoveScriptToEvaluateOnNewDocument(identifier page.ScriptIdentifier) (err error)
- func (doPage Page) ResetNavigationHistory() (err error)
- func (doPage Page) ScreencastFrameAck(sessionID int64) (err error)
- func (doPage Page) SearchInResource(frameID cdp.FrameID, url string, query string, caseSensitive *bool, ...) (retResult []*debugger.SearchMatch, err error)
- func (doPage Page) SetAdBlockingEnabled(enabled bool) (err error)
- func (doPage Page) SetBypassCSP(enabled bool) (err error)
- func (doPage Page) SetDocumentContent(frameID cdp.FrameID, html string) (err error)
- func (doPage Page) SetDownloadBehavior(behavior page.SetDownloadBehaviorBehavior, downloadPath *string) (err error)
- func (doPage Page) SetFontFamilies(fontFamilies *page.FontFamilies) (err error)
- func (doPage Page) SetFontSizes(fontSizes *page.FontSizes) (err error)
- func (doPage Page) SetInterceptFileChooserDialog(enabled bool) (err error)
- func (doPage Page) SetLifecycleEventsEnabled(enabled bool) (err error)
- func (doPage Page) SetProduceCompilationCache(enabled bool) (err error)
- func (doPage Page) SetWebLifecycleState(state page.SetWebLifecycleStateState) (err error)
- func (doPage Page) StartScreencast(format *page.ScreencastFormat, quality *int64, maxWidth *int64, ...) (err error)
- func (doPage Page) StopLoading() (err error)
- func (doPage Page) StopScreencast() (err error)
- func (doPage Page) WaitForDebugger() (err error)
- type Performance
- func (doPerformance Performance) Disable() (err error)
- func (doPerformance Performance) Enable() (err error)
- func (doPerformance Performance) GetMetrics() (retMetrics []*performance.Metric, err error)
- func (doPerformance Performance) SetTimeDomain(timeDomain performance.SetTimeDomainTimeDomain) (err error)
- type Profiler
- func (doProfiler Profiler) Disable() (err error)
- func (doProfiler Profiler) DisableRuntimeCallStats() (err error)
- func (doProfiler Profiler) Enable() (err error)
- func (doProfiler Profiler) EnableRuntimeCallStats() (err error)
- func (doProfiler Profiler) GetBestEffortCoverage() (retResult []*profiler.ScriptCoverage, err error)
- func (doProfiler Profiler) GetRuntimeCallStats() (retResult []*profiler.CounterInfo, err error)
- func (doProfiler Profiler) SetSamplingInterval(interval int64) (err error)
- func (doProfiler Profiler) Start() (err error)
- func (doProfiler Profiler) StartPreciseCoverage(callCount *bool, detailed *bool) (retTimestamp float64, err error)
- func (doProfiler Profiler) StartTypeProfile() (err error)
- func (doProfiler Profiler) Stop() (retProfile *profiler.Profile, err error)
- func (doProfiler Profiler) StopPreciseCoverage() (err error)
- func (doProfiler Profiler) StopTypeProfile() (err error)
- func (doProfiler Profiler) TakePreciseCoverage() (retResult []*profiler.ScriptCoverage, retTimestamp float64, err error)
- func (doProfiler Profiler) TakeTypeProfile() (retResult []*profiler.ScriptTypeProfile, err error)
- type Runtime
- func (doRuntime Runtime) AddBinding(name string, executionContextID *runtime.ExecutionContextID) (err error)
- func (doRuntime Runtime) AwaitPromise(promiseObjectID runtime.RemoteObjectID, returnByValue *bool, ...) (retResult *runtime.RemoteObject, retExceptionDetails *runtime.ExceptionDetails, ...)
- func (doRuntime Runtime) CallFunctionOn(functionDeclaration string, objectID *runtime.RemoteObjectID, ...) (retResult *runtime.RemoteObject, retExceptionDetails *runtime.ExceptionDetails, ...)
- func (doRuntime Runtime) CompileScript(expression string, sourceURL string, persistScript bool, ...) (retScriptID runtime.ScriptID, retExceptionDetails *runtime.ExceptionDetails, ...)
- func (doRuntime Runtime) Disable() (err error)
- func (doRuntime Runtime) DiscardConsoleEntries() (err error)
- func (doRuntime Runtime) Enable() (err error)
- func (doRuntime Runtime) Evaluate(expression string, objectGroup *string, includeCommandLineAPI *bool, ...) (retResult *runtime.RemoteObject, retExceptionDetails *runtime.ExceptionDetails, ...)
- func (doRuntime Runtime) GetHeapUsage() (retUsedSize float64, retTotalSize float64, err error)
- func (doRuntime Runtime) GetIsolateID() (retID string, err error)
- func (doRuntime Runtime) GetProperties(objectID runtime.RemoteObjectID, ownProperties *bool, ...) (retResult []*runtime.PropertyDescriptor, ...)
- func (doRuntime Runtime) GlobalLexicalScopeNames(executionContextID *runtime.ExecutionContextID) (retNames []string, err error)
- func (doRuntime Runtime) QueryObjects(prototypeObjectID runtime.RemoteObjectID, objectGroup *string) (retObjects *runtime.RemoteObject, err error)
- func (doRuntime Runtime) ReleaseObject(objectID runtime.RemoteObjectID) (err error)
- func (doRuntime Runtime) ReleaseObjectGroup(objectGroup string) (err error)
- func (doRuntime Runtime) RemoveBinding(name string) (err error)
- func (doRuntime Runtime) RunIfWaitingForDebugger() (err error)
- func (doRuntime Runtime) RunScript(scriptID runtime.ScriptID, executionContextID *runtime.ExecutionContextID, ...) (retResult *runtime.RemoteObject, retExceptionDetails *runtime.ExceptionDetails, ...)
- func (doRuntime Runtime) SetCustomObjectFormatterEnabled(enabled bool) (err error)
- func (doRuntime Runtime) SetMaxCallStackSizeToCapture(size int64) (err error)
- func (doRuntime Runtime) TerminateExecution() (err error)
- type Security
- type ServiceWorker
- func (doServiceWorker ServiceWorker) DeliverPushMessage(origin string, registrationID serviceworker.RegistrationID, data string) (err error)
- func (doServiceWorker ServiceWorker) Disable() (err error)
- func (doServiceWorker ServiceWorker) DispatchPeriodicSyncEvent(origin string, registrationID serviceworker.RegistrationID, tag string) (err error)
- func (doServiceWorker ServiceWorker) DispatchSyncEvent(origin string, registrationID serviceworker.RegistrationID, tag string, ...) (err error)
- func (doServiceWorker ServiceWorker) Enable() (err error)
- func (doServiceWorker ServiceWorker) InspectWorker(versionID string) (err error)
- func (doServiceWorker ServiceWorker) SetForceUpdateOnPageLoad(forceUpdateOnPageLoad bool) (err error)
- func (doServiceWorker ServiceWorker) SkipWaiting(scopeURL string) (err error)
- func (doServiceWorker ServiceWorker) StartWorker(scopeURL string) (err error)
- func (doServiceWorker ServiceWorker) StopAllWorkers() (err error)
- func (doServiceWorker ServiceWorker) StopWorker(versionID string) (err error)
- func (doServiceWorker ServiceWorker) Unregister(scopeURL string) (err error)
- func (doServiceWorker ServiceWorker) UpdateRegistration(scopeURL string) (err error)
- type Storage
- func (doStorage Storage) ClearCookies(browserContextID *cdp.BrowserContextID) (err error)
- func (doStorage Storage) ClearDataForOrigin(origin string, storageTypes string) (err error)
- func (doStorage Storage) GetCookies(browserContextID *cdp.BrowserContextID) (retCookies []*network.Cookie, err error)
- func (doStorage Storage) GetUsageAndQuota(origin string) (retUsage float64, retQuota float64, retUsageBreakdown []*storage.UsageForType, ...)
- func (doStorage Storage) SetCookies(cookies []*network.CookieParam, browserContextID *cdp.BrowserContextID) (err error)
- func (doStorage Storage) TrackCacheStorageForOrigin(origin string) (err error)
- func (doStorage Storage) TrackIndexedDBForOrigin(origin string) (err error)
- func (doStorage Storage) UntrackCacheStorageForOrigin(origin string) (err error)
- func (doStorage Storage) UntrackIndexedDBForOrigin(origin string) (err error)
- type SystemInfo
- type Target
- func (doTarget Target) ActivateTarget(targetID target.ID) (err error)
- func (doTarget Target) AttachToBrowserTarget() (retSessionID target.SessionID, err error)
- func (doTarget Target) AttachToTarget(targetID target.ID, flatten *bool) (retSessionID target.SessionID, err error)
- func (doTarget Target) CloseTarget(targetID target.ID) (retSuccess bool, err error)
- func (doTarget Target) CreateBrowserContext() (retBrowserContextID cdp.BrowserContextID, err error)
- func (doTarget Target) CreateTarget(url string, width *int64, height *int64, ...) (retTargetID target.ID, err error)
- func (doTarget Target) DetachFromTarget(sessionID *target.SessionID) (err error)
- func (doTarget Target) DisposeBrowserContext(browserContextID cdp.BrowserContextID) (err error)
- func (doTarget Target) ExposeDevToolsProtocol(targetID target.ID, bindingName *string) (err error)
- func (doTarget Target) GetBrowserContexts() (retBrowserContextIds []cdp.BrowserContextID, err error)
- func (doTarget Target) GetTargetInfo(targetID *target.ID) (retTargetInfo *target.Info, err error)
- func (doTarget Target) GetTargets() (retTargetInfos []*target.Info, err error)
- func (doTarget Target) SetAutoAttach(autoAttach bool, waitForDebuggerOnStart bool, flatten *bool, windowOpen *bool) (err error)
- func (doTarget Target) SetDiscoverTargets(discover bool) (err error)
- func (doTarget Target) SetRemoteLocations(locations []*target.RemoteLocation) (err error)
- type Tethering
- type Tracing
- func (doTracing Tracing) End() (err error)
- func (doTracing Tracing) GetCategories() (retCategories []string, err error)
- func (doTracing Tracing) RecordClockSyncMarker(syncID string) (err error)
- func (doTracing Tracing) RequestMemoryDump(deterministic *bool) (retDumpGUID string, retSuccess bool, err error)
- func (doTracing Tracing) Start(bufferUsageReportingInterval *float64, transferMode *tracing.TransferMode, ...) (err error)
- type WebAudio
- type WebAuthn
- func (doWebAuthn WebAuthn) AddCredential(authenticatorID webauthn.AuthenticatorID, credential *webauthn.Credential) (err error)
- func (doWebAuthn WebAuthn) AddVirtualAuthenticator(options *webauthn.VirtualAuthenticatorOptions) (retAuthenticatorID webauthn.AuthenticatorID, err error)
- func (doWebAuthn WebAuthn) ClearCredentials(authenticatorID webauthn.AuthenticatorID) (err error)
- func (doWebAuthn WebAuthn) Disable() (err error)
- func (doWebAuthn WebAuthn) Enable() (err error)
- func (doWebAuthn WebAuthn) GetCredential(authenticatorID webauthn.AuthenticatorID, credentialID string) (retCredential *webauthn.Credential, err error)
- func (doWebAuthn WebAuthn) GetCredentials(authenticatorID webauthn.AuthenticatorID) (retCredentials []*webauthn.Credential, err error)
- func (doWebAuthn WebAuthn) RemoveCredential(authenticatorID webauthn.AuthenticatorID, credentialID string) (err error)
- func (doWebAuthn WebAuthn) RemoveVirtualAuthenticator(authenticatorID webauthn.AuthenticatorID) (err error)
- func (doWebAuthn WebAuthn) SetUserVerified(authenticatorID webauthn.AuthenticatorID, isUserVerified bool) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Accessibility ¶
type Accessibility struct {
// contains filtered or unexported fields
}
Accessibility executes a cdproto command under Accessibility domain.
func (Accessibility) Disable ¶
func (doAccessibility Accessibility) Disable() (err error)
Disable disables the accessibility domain.
See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-disable
func (Accessibility) Enable ¶
func (doAccessibility Accessibility) Enable() (err error)
Enable enables the accessibility domain which causes AXNodeIds to remain consistent between method calls. This turns on accessibility for the page, which can impact performance until accessibility is disabled.
See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-enable
func (Accessibility) GetFullAXTree ¶
func (doAccessibility Accessibility) GetFullAXTree() (retNodes []*accessibility.Node, err error)
GetFullAXTree fetches the entire accessibility tree.
See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-getFullAXTree
returns:
- `retNodes`
func (Accessibility) GetPartialAXTree ¶
func (doAccessibility Accessibility) GetPartialAXTree(nodeID *cdp.NodeID, backendNodeID *cdp.BackendNodeID, objectID *runtime.RemoteObjectID, fetchRelatives *bool) (retNodes []*accessibility.Node, err error)
GetPartialAXTree fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-getPartialAXTree
parameters:
- `nodeID`: This can be nil. (Optional) Identifier of the node to get the partial accessibility tree for.
- `backendNodeID`: This can be nil. (Optional) Identifier of the backend node to get the partial accessibility tree for.
- `objectID`: This can be nil. (Optional) JavaScript object id of the node wrapper to get the partial accessibility tree for.
- `fetchRelatives`: This can be nil. (Optional) Whether to fetch this nodes ancestors, siblings and children. Defaults to true.
returns:
- `retNodes`: The Accessibility.AXNode for this DOM node, if it exists, plus its ancestors, siblings and children, if requested.
type Animation ¶
type Animation struct {
// contains filtered or unexported fields
}
Animation executes a cdproto command under Animation domain.
func (Animation) Disable ¶
Disable disables animation domain notifications.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-disable
func (Animation) Enable ¶
Enable enables animation domain notifications.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-enable
func (Animation) GetCurrentTime ¶
GetCurrentTime returns the current time of the an animation.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-getCurrentTime
parameters:
- `id`: Id of animation.
returns:
- `retCurrentTime`: Current time of the page.
func (Animation) GetPlaybackRate ¶
GetPlaybackRate gets the playback rate of the document timeline.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-getPlaybackRate
returns:
- `retPlaybackRate`: Playback rate for animations on page.
func (Animation) ReleaseAnimations ¶
ReleaseAnimations releases a set of animations to no longer be manipulated.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-releaseAnimations
parameters:
- `animations`: List of animation ids to seek.
func (Animation) ResolveAnimation ¶
func (doAnimation Animation) ResolveAnimation(animationID string) (retRemoteObject *runtime.RemoteObject, err error)
ResolveAnimation gets the remote object of the Animation.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-resolveAnimation
parameters:
- `animationID`: Animation id.
returns:
- `retRemoteObject`: Corresponding remote object.
func (Animation) SeekAnimations ¶
SeekAnimations seek a set of animations to a particular time within each animation.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-seekAnimations
parameters:
- `animations`: List of animation ids to seek.
- `currentTime`: Set the current time of each animation.
func (Animation) SetPaused ¶
SetPaused sets the paused state of a set of animations.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-setPaused
parameters:
- `animations`: Animations to set the pause state of.
- `paused`: Paused state to set to.
func (Animation) SetPlaybackRate ¶
SetPlaybackRate sets the playback rate of the document timeline.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-setPlaybackRate
parameters:
- `playbackRate`: Playback rate for animations on page
func (Animation) SetTiming ¶
func (doAnimation Animation) SetTiming(animationID string, duration float64, delay float64) (err error)
SetTiming sets the timing of an animation node.
See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-setTiming
parameters:
- `animationID`: Animation id.
- `duration`: Duration of the animation.
- `delay`: Delay of the animation.
type ApplicationCache ¶
type ApplicationCache struct {
// contains filtered or unexported fields
}
ApplicationCache executes a cdproto command under ApplicationCache domain.
func (ApplicationCache) Enable ¶
func (doApplicationCache ApplicationCache) Enable() (err error)
Enable enables application cache domain notifications.
See: https://chromedevtools.github.io/devtools-protocol/tot/ApplicationCache#method-enable
func (ApplicationCache) GetApplicationCacheForFrame ¶
func (doApplicationCache ApplicationCache) GetApplicationCacheForFrame(frameID cdp.FrameID) (retApplicationCache *applicationcache.ApplicationCache, err error)
GetApplicationCacheForFrame returns relevant application cache data for the document in given frame.
parameters:
- `frameID`: Identifier of the frame containing document whose application cache is retrieved.
returns:
- `retApplicationCache`: Relevant application cache data for the document in given frame.
func (ApplicationCache) GetFramesWithManifests ¶
func (doApplicationCache ApplicationCache) GetFramesWithManifests() (retFrameIds []*applicationcache.FrameWithManifest, err error)
GetFramesWithManifests returns array of frame identifiers with manifest urls for each frame containing a document associated with some application cache.
returns:
- `retFrameIds`: Array of frame identifiers with manifest urls for each frame containing a document associated with some application cache.
func (ApplicationCache) GetManifestForFrame ¶
func (doApplicationCache ApplicationCache) GetManifestForFrame(frameID cdp.FrameID) (retManifestURL string, err error)
GetManifestForFrame returns manifest URL for document in the given frame.
See: https://chromedevtools.github.io/devtools-protocol/tot/ApplicationCache#method-getManifestForFrame
parameters:
- `frameID`: Identifier of the frame containing document whose manifest is retrieved.
returns:
- `retManifestURL`: Manifest URL for document in the given frame.
type Audits ¶
type Audits struct {
// contains filtered or unexported fields
}
Audits executes a cdproto command under Audits domain.
func (Audits) GetEncodedResponse ¶
func (doAudits Audits) GetEncodedResponse(requestID network.RequestID, encoding audits.GetEncodedResponseEncoding, quality *float64, sizeOnly *bool) (retBody []byte, retOriginalSize int64, retEncodedSize int64, err error)
GetEncodedResponse returns the response body and size if it were re-encoded with the specified settings. Only applies to images.
See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#method-getEncodedResponse
parameters:
- `requestID`: Identifier of the network request to get content for.
- `encoding`: The encoding to use.
- `quality`: This can be nil. (Optional) The quality of the encoding (0-1). (defaults to 1)
- `sizeOnly`: This can be nil. (Optional) Whether to only return the size information (defaults to false).
returns:
- `retBody`: The encoded body as a base64 string. Omitted if sizeOnly is true.
- `retOriginalSize`: Size before re-encoding.
- `retEncodedSize`: Size after re-encoding.
type BackgroundService ¶
type BackgroundService struct {
// contains filtered or unexported fields
}
BackgroundService executes a cdproto command under BackgroundService domain.
func (BackgroundService) ClearEvents ¶
func (doBackgroundService BackgroundService) ClearEvents(service backgroundservice.ServiceName) (err error)
ClearEvents clears all stored data for the service.
See: https://chromedevtools.github.io/devtools-protocol/tot/BackgroundService#method-clearEvents
parameters:
- `service`
func (BackgroundService) SetRecording ¶
func (doBackgroundService BackgroundService) SetRecording(shouldRecord bool, service backgroundservice.ServiceName) (err error)
SetRecording set the recording state for the service.
See: https://chromedevtools.github.io/devtools-protocol/tot/BackgroundService#method-setRecording
parameters:
- `shouldRecord`
- `service`
func (BackgroundService) StartObserving ¶
func (doBackgroundService BackgroundService) StartObserving(service backgroundservice.ServiceName) (err error)
StartObserving enables event updates for the service.
See: https://chromedevtools.github.io/devtools-protocol/tot/BackgroundService#method-startObserving
parameters:
- `service`
func (BackgroundService) StopObserving ¶
func (doBackgroundService BackgroundService) StopObserving(service backgroundservice.ServiceName) (err error)
StopObserving disables event updates for the service.
See: https://chromedevtools.github.io/devtools-protocol/tot/BackgroundService#method-stopObserving
parameters:
- `service`
type Browser ¶
type Browser struct {
// contains filtered or unexported fields
}
Browser executes a cdproto command under Browser domain.
func (Browser) Close ¶
Close close browser gracefully.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-close
func (Browser) Crash ¶
Crash crashes browser on the main thread.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-crash
func (Browser) CrashGpuProcess ¶
CrashGpuProcess crashes GPU process.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-crashGpuProcess
func (Browser) GetBrowserCommandLine ¶
GetBrowserCommandLine returns the command line switches for the browser process if, and only if --enable-automation is on the commandline.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-getBrowserCommandLine
returns:
- `retArguments`: Commandline parameters
func (Browser) GetHistogram ¶
func (doBrowser Browser) GetHistogram(name string, delta *bool) (retHistogram *browser.Histogram, err error)
GetHistogram get a Chrome histogram by name.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-getHistogram
parameters:
- `name`: Requested histogram name.
- `delta`: This can be nil. (Optional) If true, retrieve delta since last call.
returns:
- `retHistogram`: Histogram.
func (Browser) GetHistograms ¶
func (doBrowser Browser) GetHistograms(query *string, delta *bool) (retHistograms []*browser.Histogram, err error)
GetHistograms get Chrome histograms.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-getHistograms
parameters:
- `query`: This can be nil. (Optional) Requested substring in name. Only histograms which have query as a substring in their name are extracted. An empty or absent query returns all histograms.
- `delta`: This can be nil. (Optional) If true, retrieve delta since last call.
returns:
- `retHistograms`: Histograms.
func (Browser) GetVersion ¶
func (doBrowser Browser) GetVersion() (retProtocolVersion string, retProduct string, retRevision string, retUserAgent string, retJsVersion string, err error)
GetVersion returns version information.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-getVersion
returns:
- `retProtocolVersion`: Protocol version.
- `retProduct`: Product name.
- `retRevision`: Product revision.
- `retUserAgent`: User-Agent.
- `retJsVersion`: V8 version.
func (Browser) GetWindowBounds ¶
func (doBrowser Browser) GetWindowBounds(windowID browser.WindowID) (retBounds *browser.Bounds, err error)
GetWindowBounds get position and size of the browser window.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-getWindowBounds
parameters:
- `windowID`: Browser window id.
returns:
- `retBounds`: Bounds information of the window. When window state is 'minimized', the restored window position and size are returned.
func (Browser) GetWindowForTarget ¶
func (doBrowser Browser) GetWindowForTarget(targetID *target.ID) (retWindowID browser.WindowID, retBounds *browser.Bounds, err error)
GetWindowForTarget get the browser window that contains the devtools target.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-getWindowForTarget
parameters:
- `targetID`: This can be nil. (Optional) Devtools agent host id. If called as a part of the session, associated targetId is used.
returns:
- `retWindowID`: Browser window id.
- `retBounds`: Bounds information of the window. When window state is 'minimized', the restored window position and size are returned.
func (Browser) GrantPermissions ¶
func (doBrowser Browser) GrantPermissions(origin string, permissions []browser.PermissionType, browserContextID *cdp.BrowserContextID) (err error)
GrantPermissions grant specific permissions to the given origin and reject all others.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-grantPermissions
parameters:
- `origin`
- `permissions`
- `browserContextID`: This can be nil. (Optional) BrowserContext to override permissions. When omitted, default browser context is used.
func (Browser) ResetPermissions ¶
func (doBrowser Browser) ResetPermissions(browserContextID *cdp.BrowserContextID) (err error)
ResetPermissions reset all permission management for all origins.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-resetPermissions
parameters:
- `browserContextID`: This can be nil. (Optional) BrowserContext to reset permissions. When omitted, default browser context is used.
func (Browser) SetDockTile ¶
SetDockTile set dock tile details, platform-specific.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-setDockTile
parameters:
- `badgeLabel`
- `image`: This can be nil. (Optional) Png encoded image.
func (Browser) SetPermission ¶
func (doBrowser Browser) SetPermission(origin string, permission *browser.PermissionDescriptor, setting browser.PermissionSetting, browserContextID *cdp.BrowserContextID) (err error)
SetPermission set permission settings for given origin.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-setPermission
parameters:
- `origin`: Origin the permission applies to.
- `permission`: Descriptor of permission to override.
- `setting`: Setting of the permission.
- `browserContextID`: This can be nil. (Optional) Context to override. When omitted, default browser context is used.
func (Browser) SetWindowBounds ¶
func (doBrowser Browser) SetWindowBounds(windowID browser.WindowID, bounds *browser.Bounds) (err error)
SetWindowBounds set position and/or size of the browser window.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-setWindowBounds
parameters:
- `windowID`: Browser window id.
- `bounds`: New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged.
type CSS ¶
type CSS struct {
// contains filtered or unexported fields
}
CSS executes a cdproto command under CSS domain.
func (CSS) AddRule ¶
func (doCSS CSS) AddRule(styleSheetID css.StyleSheetID, ruleText string, location *css.SourceRange) (retRule *css.Rule, err error)
AddRule inserts a new rule with the given ruleText in a stylesheet with given styleSheetId, at the position specified by location.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-addRule
parameters:
- `styleSheetID`: The css style sheet identifier where a new rule should be inserted.
- `ruleText`: The text of a new rule.
- `location`: Text position of a new rule in the target style sheet.
returns:
- `retRule`: The newly created rule.
func (CSS) CollectClassNames ¶
func (doCSS CSS) CollectClassNames(styleSheetID css.StyleSheetID) (retClassNames []string, err error)
CollectClassNames returns all class names from specified stylesheet.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-collectClassNames
parameters:
- `styleSheetID`
returns:
- `retClassNames`: Class name list.
func (CSS) CreateStyleSheet ¶
func (doCSS CSS) CreateStyleSheet(frameID cdp.FrameID) (retStyleSheetID css.StyleSheetID, err error)
CreateStyleSheet creates a new special "via-inspector" stylesheet in the frame with given frameId.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-createStyleSheet
parameters:
- `frameID`: Identifier of the frame where "via-inspector" stylesheet should be created.
returns:
- `retStyleSheetID`: Identifier of the created "via-inspector" stylesheet.
func (CSS) Disable ¶
Disable disables the CSS agent for the given page.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-disable
func (CSS) Enable ¶
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.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-enable
func (CSS) ForcePseudoState ¶
ForcePseudoState ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-forcePseudoState
parameters:
- `nodeID`: The element id for which to force the pseudo state.
- `forcedPseudoClasses`: Element pseudo classes to force when computing the element's style.
func (CSS) GetBackgroundColors ¶
func (doCSS CSS) GetBackgroundColors(nodeID cdp.NodeID) (retBackgroundColors []string, retComputedFontSize string, retComputedFontWeight string, err error)
GetBackgroundColors [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getBackgroundColors
parameters:
- `nodeID`: Id of the node to get background colors for.
returns:
- `retBackgroundColors`: The range of background colors behind this element, if it contains any visible text. If no visible text is present, this will be undefined. In the case of a flat background color, this will consist of simply that color. In the case of a gradient, this will consist of each of the color stops. For anything more complicated, this will be an empty array. Images will be ignored (as if the image had failed to load).
- `retComputedFontSize`: The computed font size for this node, as a CSS computed value string (e.g. '12px').
- `retComputedFontWeight`: The computed font weight for this node, as a CSS computed value string (e.g. 'normal' or '100').
func (CSS) GetComputedStyleForNode ¶
func (doCSS CSS) GetComputedStyleForNode(nodeID cdp.NodeID) (retComputedStyle []*css.ComputedStyleProperty, err error)
GetComputedStyleForNode returns the computed style for a DOM node identified by nodeId.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getComputedStyleForNode
parameters:
- `nodeID`
returns:
- `retComputedStyle`: Computed style for the specified DOM node.
func (CSS) GetInlineStylesForNode ¶
func (doCSS CSS) GetInlineStylesForNode(nodeID cdp.NodeID) (retInlineStyle *css.Style, retAttributesStyle *css.Style, err error)
GetInlineStylesForNode returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM attributes) for a DOM node identified by nodeId.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getInlineStylesForNode
parameters:
- `nodeID`
returns:
- `retInlineStyle`: Inline style for the specified DOM node.
- `retAttributesStyle`: Attribute-defined element style (e.g. resulting from "width=20 height=100%").
func (CSS) GetMatchedStylesForNode ¶
func (doCSS CSS) GetMatchedStylesForNode(nodeID cdp.NodeID) (retInlineStyle *css.Style, retAttributesStyle *css.Style, retMatchedCSSRules []*css.RuleMatch, retPseudoElements []*css.PseudoElementMatches, retInherited []*css.InheritedStyleEntry, retCSSKeyframesRules []*css.KeyframesRule, err error)
GetMatchedStylesForNode returns requested styles for a DOM node identified by nodeId.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getMatchedStylesForNode
parameters:
- `nodeID`
returns:
- `retInlineStyle`: Inline style for the specified DOM node.
- `retAttributesStyle`: Attribute-defined element style (e.g. resulting from "width=20 height=100%").
- `retMatchedCSSRules`: CSS rules matching this node, from all applicable stylesheets.
- `retPseudoElements`: Pseudo style matches for this node.
- `retInherited`: A chain of inherited styles (from the immediate node parent up to the DOM tree root).
- `retCSSKeyframesRules`: A list of CSS keyframed animations matching this node.
func (CSS) GetMediaQueries ¶
GetMediaQueries returns all media queries parsed by the rendering engine.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getMediaQueries
returns:
- `retMedias`
func (CSS) GetPlatformFontsForNode ¶
func (doCSS CSS) GetPlatformFontsForNode(nodeID cdp.NodeID) (retFonts []*css.PlatformFontUsage, err error)
GetPlatformFontsForNode requests information about platform fonts which we used to render child TextNodes in the given node.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getPlatformFontsForNode
parameters:
- `nodeID`
returns:
- `retFonts`: Usage statistics for every employed platform font.
func (CSS) GetStyleSheetText ¶
func (doCSS CSS) GetStyleSheetText(styleSheetID css.StyleSheetID) (retText string, err error)
GetStyleSheetText returns the current textual content for a stylesheet.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getStyleSheetText
parameters:
- `styleSheetID`
returns:
- `retText`: The stylesheet text.
func (CSS) SetEffectivePropertyValueForNode ¶
func (doCSS CSS) SetEffectivePropertyValueForNode(nodeID cdp.NodeID, propertyName string, value string) (err error)
SetEffectivePropertyValueForNode find a rule with the given active property for the given node and set the new value for this property.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setEffectivePropertyValueForNode
parameters:
- `nodeID`: The element id for which to set property.
- `propertyName`
- `value`
func (CSS) SetKeyframeKey ¶
func (doCSS CSS) SetKeyframeKey(styleSheetID css.StyleSheetID, rangeVal *css.SourceRange, keyText string) (retKeyText *css.Value, err error)
SetKeyframeKey modifies the keyframe rule key text.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setKeyframeKey
parameters:
- `styleSheetID`
- `range`
- `keyText`
returns:
- `retKeyText`: The resulting key text after modification.
func (CSS) SetMediaText ¶
func (doCSS CSS) SetMediaText(styleSheetID css.StyleSheetID, rangeVal *css.SourceRange, text string) (retMedia *css.Media, err error)
SetMediaText modifies the rule selector.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setMediaText
parameters:
- `styleSheetID`
- `range`
- `text`
returns:
- `retMedia`: The resulting CSS media rule after modification.
func (CSS) SetRuleSelector ¶
func (doCSS CSS) SetRuleSelector(styleSheetID css.StyleSheetID, rangeVal *css.SourceRange, selector string) (retSelectorList *css.SelectorList, err error)
SetRuleSelector modifies the rule selector.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setRuleSelector
parameters:
- `styleSheetID`
- `range`
- `selector`
returns:
- `retSelectorList`: The resulting selector list after modification.
func (CSS) SetStyleSheetText ¶
func (doCSS CSS) SetStyleSheetText(styleSheetID css.StyleSheetID, text string) (retSourceMapURL string, err error)
SetStyleSheetText sets the new stylesheet text.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setStyleSheetText
parameters:
- `styleSheetID`
- `text`
returns:
- `retSourceMapURL`: URL of source map associated with script (if any).
func (CSS) SetStyleTexts ¶
func (doCSS CSS) SetStyleTexts(edits []*css.StyleDeclarationEdit) (retStyles []*css.Style, err error)
SetStyleTexts applies specified style edits one after another in the given order.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setStyleTexts
parameters:
- `edits`
returns:
- `retStyles`: The resulting styles after modification.
func (CSS) StartRuleUsageTracking ¶
StartRuleUsageTracking enables the selector recording.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-startRuleUsageTracking
func (CSS) StopRuleUsageTracking ¶
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).
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-stopRuleUsageTracking
returns:
- `retRuleUsage`
func (CSS) TakeCoverageDelta ¶
func (doCSS CSS) TakeCoverageDelta() (retCoverage []*css.RuleUsage, retTimestamp float64, err error)
TakeCoverageDelta obtain list of rules that became used since last call to this method (or since start of coverage instrumentation).
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-takeCoverageDelta
returns:
- `retCoverage`
- `retTimestamp`: Monotonically increasing time, in seconds.
type CacheStorage ¶
type CacheStorage struct {
// contains filtered or unexported fields
}
CacheStorage executes a cdproto command under CacheStorage domain.
func (CacheStorage) DeleteCache ¶
func (doCacheStorage CacheStorage) DeleteCache(cacheID cachestorage.CacheID) (err error)
DeleteCache deletes a cache.
See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#method-deleteCache
parameters:
- `cacheID`: Id of cache for deletion.
func (CacheStorage) DeleteEntry ¶
func (doCacheStorage CacheStorage) DeleteEntry(cacheID cachestorage.CacheID, request string) (err error)
DeleteEntry deletes a cache entry.
See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#method-deleteEntry
parameters:
- `cacheID`: Id of cache where the entry will be deleted.
- `request`: URL spec of the request.
func (CacheStorage) RequestCacheNames ¶
func (doCacheStorage CacheStorage) RequestCacheNames(securityOrigin string) (retCaches []*cachestorage.Cache, err error)
RequestCacheNames requests cache names.
See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#method-requestCacheNames
parameters:
- `securityOrigin`: Security origin.
returns:
- `retCaches`: Caches for the security origin.
func (CacheStorage) RequestCachedResponse ¶
func (doCacheStorage CacheStorage) RequestCachedResponse(cacheID cachestorage.CacheID, requestURL string, requestHeaders []*cachestorage.Header) (retResponse *cachestorage.CachedResponse, err error)
RequestCachedResponse fetches cache entry.
See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#method-requestCachedResponse
parameters:
- `cacheID`: Id of cache that contains the entry.
- `requestURL`: URL spec of the request.
- `requestHeaders`: headers of the request.
returns:
- `retResponse`: Response read from the cache.
func (CacheStorage) RequestEntries ¶
func (doCacheStorage CacheStorage) RequestEntries(cacheID cachestorage.CacheID, skipCount *int64, pageSize *int64, pathFilter *string) (retCacheDataEntries []*cachestorage.DataEntry, retReturnCount float64, err error)
RequestEntries requests data from cache.
See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#method-requestEntries
parameters:
- `cacheID`: ID of cache to get entries from.
- `skipCount`: This can be nil. (Optional) Number of records to skip.
- `pageSize`: This can be nil. (Optional) Number of records to fetch.
- `pathFilter`: This can be nil. (Optional) If present, only return the entries containing this substring in the path
returns:
- `retCacheDataEntries`: Array of object store data entries.
- `retReturnCount`: Count of returned entries from this storage. If pathFilter is empty, it is the count of all entries from this storage.
type Cast ¶
type Cast struct {
// contains filtered or unexported fields
}
Cast executes a cdproto command under Cast domain.
func (Cast) Disable ¶
Disable stops observing for sinks and issues.
See: https://chromedevtools.github.io/devtools-protocol/tot/Cast#method-disable
func (Cast) Enable ¶
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.
See: https://chromedevtools.github.io/devtools-protocol/tot/Cast#method-enable
parameters:
- `presentationURL`
func (Cast) SetSinkToUse ¶
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.
See: https://chromedevtools.github.io/devtools-protocol/tot/Cast#method-setSinkToUse
parameters:
- `sinkName`
func (Cast) StartTabMirroring ¶
StartTabMirroring starts mirroring the tab to the sink.
See: https://chromedevtools.github.io/devtools-protocol/tot/Cast#method-startTabMirroring
parameters:
- `sinkName`
func (Cast) StopCasting ¶
StopCasting stops the active Cast session on the sink.
See: https://chromedevtools.github.io/devtools-protocol/tot/Cast#method-stopCasting
parameters:
- `sinkName`
type DOM ¶
type DOM struct {
// contains filtered or unexported fields
}
DOM executes a cdproto command under DOM domain.
func (DOM) CollectClassNamesFromSubtree ¶
func (doDOM DOM) CollectClassNamesFromSubtree(nodeID cdp.NodeID) (retClassNames []string, err error)
CollectClassNamesFromSubtree collects class names for the node with given id and all of it's child nodes.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-collectClassNamesFromSubtree
parameters:
- `nodeID`: Id of the node to collect class names.
returns:
- `retClassNames`: Class name list.
func (DOM) CopyTo ¶
func (doDOM DOM) CopyTo(nodeID cdp.NodeID, targetNodeID cdp.NodeID, insertBeforeNodeID *cdp.NodeID) (retNodeID cdp.NodeID, err error)
CopyTo creates a deep copy of the specified node and places it into the target container before the given anchor.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-copyTo
parameters:
- `nodeID`: Id of the node to copy.
- `targetNodeID`: Id of the element to drop the copy into.
- `insertBeforeNodeID`: This can be nil. (Optional) Drop the copy before this node (if absent, the copy becomes the last child of targetNodeId).
returns:
- `retNodeID`: Id of the node clone.
func (DOM) DescribeNode ¶
func (doDOM DOM) DescribeNode(nodeID *cdp.NodeID, backendNodeID *cdp.BackendNodeID, objectID *runtime.RemoteObjectID, depth *int64, pierce *bool) (retNode *cdp.Node, err error)
DescribeNode describes node given its id, does not require domain to be enabled. Does not start tracking any objects, can be used for automation.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-describeNode
parameters:
- `nodeID`: This can be nil. (Optional) Identifier of the node.
- `backendNodeID`: This can be nil. (Optional) Identifier of the backend node.
- `objectID`: This can be nil. (Optional) JavaScript object id of the node wrapper.
- `depth`: This can be nil. (Optional) The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
- `pierce`: This can be nil. (Optional) Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).
returns:
- `retNode`: Node description.
func (DOM) Disable ¶
Disable disables DOM agent for the given page.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-disable
func (DOM) DiscardSearchResults ¶
DiscardSearchResults discards search results from the session with the given id. getSearchResults should no longer be called for that search.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-discardSearchResults
parameters:
- `searchID`: Unique search session identifier.
func (DOM) Enable ¶
Enable enables DOM agent for the given page.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-enable
func (DOM) Focus ¶
func (doDOM DOM) Focus(nodeID *cdp.NodeID, backendNodeID *cdp.BackendNodeID, objectID *runtime.RemoteObjectID) (err error)
Focus focuses the given element.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-focus
parameters:
- `nodeID`: This can be nil. (Optional) Identifier of the node.
- `backendNodeID`: This can be nil. (Optional) Identifier of the backend node.
- `objectID`: This can be nil. (Optional) JavaScript object id of the node wrapper.
func (DOM) GetAttributes ¶
GetAttributes returns attributes for the specified node.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getAttributes
parameters:
- `nodeID`: Id of the node to retrieve attibutes for.
returns:
- `retAttributes`: An interleaved array of node attribute names and values.
func (DOM) GetBoxModel ¶
func (doDOM DOM) GetBoxModel(nodeID *cdp.NodeID, backendNodeID *cdp.BackendNodeID, objectID *runtime.RemoteObjectID) (retModel *dom.BoxModel, err error)
GetBoxModel returns boxes for the given node.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getBoxModel
parameters:
- `nodeID`: This can be nil. (Optional) Identifier of the node.
- `backendNodeID`: This can be nil. (Optional) Identifier of the backend node.
- `objectID`: This can be nil. (Optional) JavaScript object id of the node wrapper.
returns:
- `retModel`: Box model for the node.
func (DOM) GetContentQuads ¶
func (doDOM DOM) GetContentQuads(nodeID *cdp.NodeID, backendNodeID *cdp.BackendNodeID, objectID *runtime.RemoteObjectID) (retQuads []dom.Quad, err error)
GetContentQuads returns quads that describe node position on the page. This method might return multiple quads for inline nodes.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getContentQuads
parameters:
- `nodeID`: This can be nil. (Optional) Identifier of the node.
- `backendNodeID`: This can be nil. (Optional) Identifier of the backend node.
- `objectID`: This can be nil. (Optional) JavaScript object id of the node wrapper.
returns:
- `retQuads`: Quads that describe node layout relative to viewport.
func (DOM) GetDocument ¶
GetDocument returns the root DOM node (and optionally the subtree) to the caller.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getDocument
parameters:
- `depth`: This can be nil. (Optional) The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
- `pierce`: This can be nil. (Optional) Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).
returns:
- `retRoot`: Resulting node.
func (DOM) GetFileInfo ¶
func (doDOM DOM) GetFileInfo(objectID runtime.RemoteObjectID) (retPath string, err error)
GetFileInfo returns file information for the given File wrapper.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getFileInfo
parameters:
- `objectID`: JavaScript object id of the node wrapper.
returns:
- `retPath`
func (DOM) GetFlattenedDocument ¶
GetFlattenedDocument returns the root DOM node (and optionally the subtree) to the caller.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getFlattenedDocument
parameters:
- `depth`: This can be nil. (Optional) The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
- `pierce`: This can be nil. (Optional) Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).
returns:
- `retNodes`: Resulting node.
func (DOM) GetFrameOwner ¶
func (doDOM DOM) GetFrameOwner(frameID cdp.FrameID) (retBackendNodeID cdp.BackendNodeID, retNodeID cdp.NodeID, err error)
GetFrameOwner returns iframe node that owns iframe with the given domain.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getFrameOwner
parameters:
- `frameID`
returns:
- `retBackendNodeID`: Resulting node.
- `retNodeID`: Id of the node at given coordinates, only when enabled and requested document.
func (DOM) GetNodeForLocation ¶
func (doDOM DOM) GetNodeForLocation(x int64, y int64, includeUserAgentShadowDOM *bool, ignorePointerEventsNone *bool) (retBackendNodeID cdp.BackendNodeID, retFrameID cdp.FrameID, retNodeID cdp.NodeID, err error)
GetNodeForLocation returns node id at given location. Depending on whether DOM domain is enabled, nodeId is either returned or not.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getNodeForLocation
parameters:
- `x`: X coordinate.
- `y`: Y coordinate.
- `includeUserAgentShadowDOM`: This can be nil. (Optional) False to skip to the nearest non-UA shadow root ancestor (default: false).
- `ignorePointerEventsNone`: This can be nil. (Optional) Whether to ignore pointer-events: none on elements and hit test them.
returns:
- `retBackendNodeID`: Resulting node.
- `retFrameID`: Frame this node belongs to.
- `retNodeID`: Id of the node at given coordinates, only when enabled and requested document.
func (DOM) GetNodeStackTraces ¶
GetNodeStackTraces gets stack traces associated with a Node. As of now, only provides stack trace for Node creation.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getNodeStackTraces
parameters:
- `nodeID`: Id of the node to get stack traces for.
returns:
- `retCreation`: Creation stack trace, if available.
func (DOM) GetOuterHTML ¶
func (doDOM DOM) GetOuterHTML(nodeID *cdp.NodeID, backendNodeID *cdp.BackendNodeID, objectID *runtime.RemoteObjectID) (retOuterHTML string, err error)
GetOuterHTML returns node's HTML markup.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getOuterHTML
parameters:
- `nodeID`: This can be nil. (Optional) Identifier of the node.
- `backendNodeID`: This can be nil. (Optional) Identifier of the backend node.
- `objectID`: This can be nil. (Optional) JavaScript object id of the node wrapper.
returns:
- `retOuterHTML`: Outer HTML markup.
func (DOM) GetRelayoutBoundary ¶
GetRelayoutBoundary returns the id of the nearest ancestor that is a relayout boundary.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getRelayoutBoundary
parameters:
- `nodeID`: Id of the node.
returns:
- `retNodeID`: Relayout boundary node id for the given node.
func (DOM) GetSearchResults ¶
func (doDOM DOM) GetSearchResults(searchID string, fromIndex int64, toIndex int64) (retNodeIds []cdp.NodeID, err error)
GetSearchResults returns search results from given fromIndex to given toIndex from the search with the given identifier.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getSearchResults
parameters:
- `searchID`: Unique search session identifier.
- `fromIndex`: Start index of the search result to be returned.
- `toIndex`: End index of the search result to be returned.
returns:
- `retNodeIds`: Ids of the search result nodes.
func (DOM) MarkUndoableState ¶
MarkUndoableState marks last undoable state.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-markUndoableState
func (DOM) MoveTo ¶
func (doDOM DOM) MoveTo(nodeID cdp.NodeID, targetNodeID cdp.NodeID, insertBeforeNodeID *cdp.NodeID) (retNodeID cdp.NodeID, err error)
MoveTo moves node into the new container, places it before the given anchor.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-moveTo
parameters:
- `nodeID`: Id of the node to move.
- `targetNodeID`: Id of the element to drop the moved node into.
- `insertBeforeNodeID`: This can be nil. (Optional) Drop node before this one (if absent, the moved node becomes the last child of targetNodeId).
returns:
- `retNodeID`: New id of the moved node.
func (DOM) PerformSearch ¶
func (doDOM DOM) PerformSearch(query string, includeUserAgentShadowDOM *bool) (retSearchID string, retResultCount int64, err error)
PerformSearch searches for a given string in the DOM tree. Use getSearchResults to access search results or cancelSearch to end this search session.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-performSearch
parameters:
- `query`: Plain text or query selector or XPath search query.
- `includeUserAgentShadowDOM`: This can be nil. (Optional) True to search in user agent shadow DOM.
returns:
- `retSearchID`: Unique search session identifier.
- `retResultCount`: Number of search results.
func (DOM) PushNodeByPathToFrontend ¶
PushNodeByPathToFrontend requests that the node is sent to the caller given its path. // FIXME, use XPath.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-pushNodeByPathToFrontend
parameters:
- `path`: Path to node in the proprietary format.
returns:
- `retNodeID`: Id of the node for given path.
func (DOM) PushNodesByBackendIdsToFrontend ¶
func (doDOM DOM) PushNodesByBackendIdsToFrontend(backendNodeIds []cdp.BackendNodeID) (retNodeIds []cdp.NodeID, err error)
PushNodesByBackendIdsToFrontend requests that a batch of nodes is sent to the caller given their backend node ids.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-pushNodesByBackendIdsToFrontend
parameters:
- `backendNodeIds`: The array of backend node ids.
returns:
- `retNodeIds`: The array of ids of pushed nodes that correspond to the backend ids specified in backendNodeIds.
func (DOM) QuerySelector ¶
func (doDOM DOM) QuerySelector(nodeID cdp.NodeID, selector string) (retNodeID cdp.NodeID, err error)
QuerySelector executes querySelector on a given node.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-querySelector
parameters:
- `nodeID`: Id of the node to query upon.
- `selector`: Selector string.
returns:
- `retNodeID`: Query selector result.
func (DOM) QuerySelectorAll ¶
func (doDOM DOM) QuerySelectorAll(nodeID cdp.NodeID, selector string) (retNodeIds []cdp.NodeID, err error)
QuerySelectorAll executes querySelectorAll on a given node.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-querySelectorAll
parameters:
- `nodeID`: Id of the node to query upon.
- `selector`: Selector string.
returns:
- `retNodeIds`: Query selector result.
func (DOM) Redo ¶
Redo re-does the last undone action.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-redo
func (DOM) RemoveAttribute ¶
RemoveAttribute removes attribute with given name from an element with given id.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-removeAttribute
parameters:
- `nodeID`: Id of the element to remove attribute from.
- `name`: Name of the attribute to remove.
func (DOM) RemoveNode ¶
RemoveNode removes node with given id.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-removeNode
parameters:
- `nodeID`: Id of the node to remove.
func (DOM) RequestChildNodes ¶
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.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-requestChildNodes
parameters:
- `nodeID`: Id of the node to get children for.
- `depth`: This can be nil. (Optional) The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
- `pierce`: This can be nil. (Optional) Whether or not iframes and shadow roots should be traversed when returning the sub-tree (default is false).
func (DOM) RequestNode ¶
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.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-requestNode
parameters:
- `objectID`: JavaScript object id to convert into node.
returns:
- `retNodeID`: Node id for given object.
func (DOM) ResolveNode ¶
func (doDOM DOM) ResolveNode(nodeID *cdp.NodeID, backendNodeID *cdp.BackendNodeID, objectGroup *string, executionContextID *runtime.ExecutionContextID) (retObject *runtime.RemoteObject, err error)
ResolveNode resolves the JavaScript node object for a given NodeId or BackendNodeId.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-resolveNode
parameters:
- `nodeID`: This can be nil. (Optional) Id of the node to resolve.
- `backendNodeID`: This can be nil. (Optional) Backend identifier of the node to resolve.
- `objectGroup`: This can be nil. (Optional) Symbolic group name that can be used to release multiple objects.
- `executionContextID`: This can be nil. (Optional) Execution context in which to resolve the node.
returns:
- `retObject`: JavaScript object wrapper for given node.
func (DOM) SetAttributeValue ¶
SetAttributeValue sets attribute for an element with given id.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setAttributeValue
parameters:
- `nodeID`: Id of the element to set attribute for.
- `name`: Attribute name.
- `value`: Attribute value.
func (DOM) SetAttributesAsText ¶
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.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setAttributesAsText
parameters:
- `nodeID`: Id of the element to set attributes for.
- `text`: Text with a number of attributes. Will parse this text using HTML parser.
- `name`: This can be nil. (Optional) Attribute name to replace with new attributes derived from text in case text parsed successfully.
func (DOM) SetFileInputFiles ¶
func (doDOM DOM) SetFileInputFiles(files []string, nodeID *cdp.NodeID, backendNodeID *cdp.BackendNodeID, objectID *runtime.RemoteObjectID) (err error)
SetFileInputFiles sets files for the given file input element.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setFileInputFiles
parameters:
- `files`: Array of file paths to set.
- `nodeID`: This can be nil. (Optional) Identifier of the node.
- `backendNodeID`: This can be nil. (Optional) Identifier of the backend node.
- `objectID`: This can be nil. (Optional) JavaScript object id of the node wrapper.
func (DOM) SetInspectedNode ¶
SetInspectedNode enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setInspectedNode
parameters:
- `nodeID`: DOM node id to be accessible by means of $x command line API.
func (DOM) SetNodeName ¶
SetNodeName sets node name for a node with given id.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setNodeName
parameters:
- `nodeID`: Id of the node to set name for.
- `name`: New node's name.
returns:
- `retNodeID`: New node's id.
func (DOM) SetNodeStackTracesEnabled ¶
SetNodeStackTracesEnabled sets if stack traces should be captured for Nodes. See Node.getNodeStackTraces. Default is disabled.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setNodeStackTracesEnabled
parameters:
- `enable`: Enable or disable.
func (DOM) SetNodeValue ¶
SetNodeValue sets node value for a node with given id.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setNodeValue
parameters:
- `nodeID`: Id of the node to set value for.
- `value`: New node's value.
func (DOM) SetOuterHTML ¶
SetOuterHTML sets node HTML markup, returns new node id.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setOuterHTML
parameters:
- `nodeID`: Id of the node to set markup for.
- `outerHTML`: Outer HTML markup to set.
func (DOM) Undo ¶
Undo undoes the last performed action.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-undo
type DOMDebugger ¶
type DOMDebugger struct {
// contains filtered or unexported fields
}
DOMDebugger executes a cdproto command under DOMDebugger domain.
func (DOMDebugger) GetEventListeners ¶
func (doDOMDebugger DOMDebugger) GetEventListeners(objectID runtime.RemoteObjectID, depth *int64, pierce *bool) (retListeners []*domdebugger.EventListener, err error)
GetEventListeners returns event listeners of the given object.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-getEventListeners
parameters:
- `objectID`: Identifier of the object to return listeners for.
- `depth`: This can be nil. (Optional) The maximum depth at which Node children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
- `pierce`: This can be nil. (Optional) Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false). Reports listeners for all contexts if pierce is enabled.
returns:
- `retListeners`: Array of relevant listeners.
func (DOMDebugger) RemoveDOMBreakpoint ¶
func (doDOMDebugger DOMDebugger) RemoveDOMBreakpoint(nodeID cdp.NodeID, typeVal domdebugger.DOMBreakpointType) (err error)
RemoveDOMBreakpoint removes DOM breakpoint that was set using setDOMBreakpoint.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-removeDOMBreakpoint
parameters:
- `nodeID`: Identifier of the node to remove breakpoint from.
- `type`: Type of the breakpoint to remove.
func (DOMDebugger) RemoveEventListenerBreakpoint ¶
func (doDOMDebugger DOMDebugger) RemoveEventListenerBreakpoint(eventName string, targetName *string) (err error)
RemoveEventListenerBreakpoint removes breakpoint on particular DOM event.
parameters:
- `eventName`: Event name.
- `targetName`: This can be nil. (Optional) EventTarget interface name.
func (DOMDebugger) RemoveInstrumentationBreakpoint ¶
func (doDOMDebugger DOMDebugger) RemoveInstrumentationBreakpoint(eventName string) (err error)
RemoveInstrumentationBreakpoint removes breakpoint on particular native event.
parameters:
- `eventName`: Instrumentation name to stop on.
func (DOMDebugger) RemoveXHRBreakpoint ¶
func (doDOMDebugger DOMDebugger) RemoveXHRBreakpoint(url string) (err error)
RemoveXHRBreakpoint removes breakpoint from XMLHttpRequest.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-removeXHRBreakpoint
parameters:
- `url`: Resource URL substring.
func (DOMDebugger) SetDOMBreakpoint ¶
func (doDOMDebugger DOMDebugger) SetDOMBreakpoint(nodeID cdp.NodeID, typeVal domdebugger.DOMBreakpointType) (err error)
SetDOMBreakpoint sets breakpoint on particular operation with DOM.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-setDOMBreakpoint
parameters:
- `nodeID`: Identifier of the node to set breakpoint on.
- `type`: Type of the operation to stop upon.
func (DOMDebugger) SetEventListenerBreakpoint ¶
func (doDOMDebugger DOMDebugger) SetEventListenerBreakpoint(eventName string, targetName *string) (err error)
SetEventListenerBreakpoint sets breakpoint on particular DOM event.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-setEventListenerBreakpoint
parameters:
- `eventName`: DOM Event name to stop on (any DOM event will do).
- `targetName`: This can be nil. (Optional) EventTarget interface name to stop on. If equal to "*" or not provided, will stop on any EventTarget.
func (DOMDebugger) SetInstrumentationBreakpoint ¶
func (doDOMDebugger DOMDebugger) SetInstrumentationBreakpoint(eventName string) (err error)
SetInstrumentationBreakpoint sets breakpoint on particular native event.
parameters:
- `eventName`: Instrumentation name to stop on.
func (DOMDebugger) SetXHRBreakpoint ¶
func (doDOMDebugger DOMDebugger) SetXHRBreakpoint(url string) (err error)
SetXHRBreakpoint sets breakpoint on XMLHttpRequest.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-setXHRBreakpoint
parameters:
- `url`: Resource URL substring. All XHRs having this substring in the URL will get stopped upon.
type DOMSnapshot ¶
type DOMSnapshot struct {
// contains filtered or unexported fields
}
DOMSnapshot executes a cdproto command under DOMSnapshot domain.
func (DOMSnapshot) CaptureSnapshot ¶
func (doDOMSnapshot DOMSnapshot) CaptureSnapshot(computedStyles []string, includePaintOrder *bool, includeDOMRects *bool) (retDocuments []*domsnapshot.DocumentSnapshot, retStrings []string, err error)
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.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#method-captureSnapshot
parameters:
- `computedStyles`: Whitelist of computed styles to return.
- `includePaintOrder`: This can be nil. (Optional) Whether to include layout object paint orders into the snapshot.
- `includeDOMRects`: This can be nil. (Optional) Whether to include DOM rectangles (offsetRects, clientRects, scrollRects) into the snapshot
returns:
- `retDocuments`: The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document.
- `retStrings`: Shared string table that all string properties refer to with indexes.
func (DOMSnapshot) Disable ¶
func (doDOMSnapshot DOMSnapshot) Disable() (err error)
Disable disables DOM snapshot agent for the given page.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#method-disable
func (DOMSnapshot) Enable ¶
func (doDOMSnapshot DOMSnapshot) Enable() (err error)
Enable enables DOM snapshot agent for the given page.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#method-enable
type DOMStorage ¶
type DOMStorage struct {
// contains filtered or unexported fields
}
DOMStorage executes a cdproto command under DOMStorage domain.
func (DOMStorage) Clear ¶
func (doDOMStorage DOMStorage) Clear(storageID *domstorage.StorageID) (err error)
Clear [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/DOMStorage#method-clear
parameters:
- `storageID`
func (DOMStorage) Disable ¶
func (doDOMStorage DOMStorage) Disable() (err error)
Disable disables storage tracking, prevents storage events from being sent to the client.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOMStorage#method-disable
func (DOMStorage) Enable ¶
func (doDOMStorage DOMStorage) Enable() (err error)
Enable enables storage tracking, storage events will now be delivered to the client.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOMStorage#method-enable
func (DOMStorage) GetDOMStorageItems ¶
func (doDOMStorage DOMStorage) GetDOMStorageItems(storageID *domstorage.StorageID) (retEntries []domstorage.Item, err error)
GetDOMStorageItems [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/DOMStorage#method-getDOMStorageItems
parameters:
- `storageID`
returns:
- `retEntries`
func (DOMStorage) RemoveDOMStorageItem ¶
func (doDOMStorage DOMStorage) RemoveDOMStorageItem(storageID *domstorage.StorageID, key string) (err error)
RemoveDOMStorageItem [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/DOMStorage#method-removeDOMStorageItem
parameters:
- `storageID`
- `key`
func (DOMStorage) SetDOMStorageItem ¶
func (doDOMStorage DOMStorage) SetDOMStorageItem(storageID *domstorage.StorageID, key string, value string) (err error)
SetDOMStorageItem [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/DOMStorage#method-setDOMStorageItem
parameters:
- `storageID`
- `key`
- `value`
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
Database executes a cdproto command under Database domain.
func (Database) Disable ¶
Disable disables database tracking, prevents database events from being sent to the client.
See: https://chromedevtools.github.io/devtools-protocol/tot/Database#method-disable
func (Database) Enable ¶
Enable enables database tracking, database events will now be delivered to the client.
See: https://chromedevtools.github.io/devtools-protocol/tot/Database#method-enable
func (Database) ExecuteSQL ¶
func (doDatabase Database) ExecuteSQL(databaseID database.ID, query string) (retColumnNames []string, retValues []easyjson.RawMessage, retSQLError *database.Error, err error)
ExecuteSQL [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Database#method-executeSQL
parameters:
- `databaseID`
- `query`
returns:
- `retColumnNames`
- `retValues`
- `retSQLError`
func (Database) GetDatabaseTableNames ¶
func (doDatabase Database) GetDatabaseTableNames(databaseID database.ID) (retTableNames []string, err error)
GetDatabaseTableNames [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Database#method-getDatabaseTableNames
parameters:
- `databaseID`
returns:
- `retTableNames`
type Debugger ¶
type Debugger struct {
// contains filtered or unexported fields
}
Debugger executes a cdproto command under Debugger domain.
func (Debugger) ContinueToLocation ¶
func (doDebugger Debugger) ContinueToLocation(location *debugger.Location, targetCallFrames *debugger.ContinueToLocationTargetCallFrames) (err error)
ContinueToLocation continues execution until specific location is reached.
See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-continueToLocation
parameters:
- `location`: Location to continue to.
- `targetCallFrames`
func (Debugger) Disable ¶
Disable disables debugger for given page.
See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-disable
func (Debugger) Enable ¶
func (doDebugger Debugger) Enable(maxScriptsCacheSize *float64) (retDebuggerID runtime.UniqueDebuggerID, err error)
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.
See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-enable
parameters:
- `maxScriptsCacheSize`: This can be nil. (Optional) The maximum size in bytes of collected scripts (not referenced by other heap objects) the debugger can hold. Puts no limit if parameter is omitted.
returns:
- `retDebuggerID`: Unique identifier of the debugger.
func (Debugger) EvaluateOnCallFrame ¶
func (doDebugger Debugger) EvaluateOnCallFrame(callFrameID debugger.CallFrameID, expression string, objectGroup *string, includeCommandLineAPI *bool, silent *bool, returnByValue *bool, generatePreview *bool, throwOnSideEffect *bool, timeout *runtime.TimeDelta) (retResult *runtime.RemoteObject, retExceptionDetails *runtime.ExceptionDetails, err error)
EvaluateOnCallFrame evaluates expression on a given call frame.
See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-evaluateOnCallFrame
parameters:
- `callFrameID`: Call frame identifier to evaluate on.
- `expression`: Expression to evaluate.
- `objectGroup`: This can be nil. (Optional) String object group name to put result into (allows rapid releasing resulting object handles using releaseObjectGroup).
- `includeCommandLineAPI`: This can be nil. (Optional) Specifies whether command line API should be available to the evaluated expression, defaults to false.
- `silent`: This can be nil. (Optional) In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.
- `returnByValue`: This can be nil. (Optional) Whether the result is expected to be a JSON object that should be sent by value.
- `generatePreview`: This can be nil. (Optional) Whether preview should be generated for the result.
- `throwOnSideEffect`: This can be nil. (Optional) Whether to throw an exception if side effect cannot be ruled out during evaluation.
- `timeout`: This can be nil. (Optional) Terminate execution after timing out (number of milliseconds).
returns:
- `retResult`: Object wrapper for the evaluation result.
- `retExceptionDetails`: Exception details.
func (Debugger) GetPossibleBreakpoints ¶
func (doDebugger Debugger) GetPossibleBreakpoints(start *debugger.Location, end *debugger.Location, restrictToFunction *bool) (retLocations []*debugger.BreakLocation, err error)
GetPossibleBreakpoints returns possible locations for breakpoint. scriptId in start and end range locations should be the same.
See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-getPossibleBreakpoints
parameters:
- `start`: Start of range to search possible breakpoint locations in.
- `end`: This can be nil. (Optional) End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range.
- `restrictToFunction`: This can be nil. (Optional) Only consider locations which are in the same (non-nested) function as start.
returns:
- `retLocations`: List of the possible breakpoint locations.
func (Debugger) GetScriptSource ¶
func (doDebugger Debugger) GetScriptSource(scriptID runtime.ScriptID) (retScriptSource string, retBytecode []byte, err error)
GetScriptSource returns source for the script with given id.
See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-getScriptSource
parameters:
- `scriptID`: Id of the script to get source for.
returns:
- `retScriptSource`: Script source (empty in case of Wasm bytecode).
- `retBytecode`: Wasm bytecode.
func (Debugger) GetStackTrace ¶
func (doDebugger Debugger) GetStackTrace(stackTraceID *runtime.StackTraceID) (retStackTrace *runtime.StackTrace, err error)
GetStackTrace returns stack trace with given stackTraceId.
See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-getStackTrace
parameters:
- `stackTraceID`
returns:
- `retStackTrace`
func (Debugger) Pause ¶
Pause stops on the next JavaScript statement.
See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-pause
func (Debugger) RemoveBreakpoint ¶
func (doDebugger Debugger) RemoveBreakpoint(breakpointID debugger.BreakpointID) (err error)
RemoveBreakpoint removes JavaScript breakpoint.
See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-removeBreakpoint
parameters:
- `breakpointID`
func (Debugger) RestartFrame ¶
func (doDebugger Debugger) RestartFrame(callFrameID debugger.CallFrameID) (retCallFrames []*debugger.CallFrame, retAsyncStackTrace *runtime.StackTrace, retAsyncStackTraceID *runtime.StackTraceID, err error)
RestartFrame restarts particular call frame from the beginning.
See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-restartFrame
parameters:
- `callFrameID`: Call frame identifier to evaluate on.
returns:
- `retCallFrames`: New stack trace.
- `retAsyncStackTrace`: Async stack trace, if any.
- `retAsyncStackTraceID`: Async stack trace, if any.
func (Debugger) Resume ¶
Resume resumes JavaScript execution.
See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-resume
func (Debugger) SearchInContent ¶
func (doDebugger Debugger) SearchInContent(scriptID runtime.ScriptID, query string, caseSensitive *bool, isRegex *bool) (retResult []*debugger.SearchMatch, err error)
SearchInContent searches for given string in script content.
See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-searchInContent
parameters:
- `scriptID`: Id of the script to search in.
- `query`: String to search for.
- `caseSensitive`: This can be nil. (Optional) If true, search is case sensitive.
- `isRegex`: This can be nil. (Optional) If true, treats string parameter as regex.
returns:
- `retResult`: List of search matches.
func (Debugger) SetAsyncCallStackDepth ¶
SetAsyncCallStackDepth enables or disables async call stacks tracking.
See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setAsyncCallStackDepth
parameters:
- `maxDepth`: Maximum depth of async call stacks. Setting to 0 will effectively disable collecting async call stacks (default).
func (Debugger) SetBlackboxPatterns ¶
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.
See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setBlackboxPatterns
parameters:
- `patterns`: Array of regexps that will be used to check script url for blackbox state.
func (Debugger) SetBlackboxedRanges ¶
func (doDebugger Debugger) SetBlackboxedRanges(scriptID runtime.ScriptID, positions []*debugger.ScriptPosition) (err error)
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.
See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setBlackboxedRanges
parameters:
- `scriptID`: Id of the script.
- `positions`
func (Debugger) SetBreakpoint ¶
func (doDebugger Debugger) SetBreakpoint(location *debugger.Location, condition *string) (retBreakpointID debugger.BreakpointID, retActualLocation *debugger.Location, err error)
SetBreakpoint sets JavaScript breakpoint at a given location.
See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setBreakpoint
parameters:
- `location`: Location to set breakpoint in.
- `condition`: This can be nil. (Optional) Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
returns:
- `retBreakpointID`: Id of the created breakpoint for further reference.
- `retActualLocation`: Location this breakpoint resolved into.
func (Debugger) SetBreakpointByURL ¶
func (doDebugger Debugger) SetBreakpointByURL(lineNumber int64, url *string, urlRegex *string, scriptHash *string, columnNumber *int64, condition *string) (retBreakpointID debugger.BreakpointID, retLocations []*debugger.Location, err error)
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.
See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setBreakpointByUrl
parameters:
- `lineNumber`: Line number to set breakpoint at.
- `url`: This can be nil. (Optional) URL of the resources to set breakpoint on.
- `urlRegex`: This can be nil. (Optional) Regex pattern for the URLs of the resources to set breakpoints on. Either url or urlRegex must be specified.
- `scriptHash`: This can be nil. (Optional) Script hash of the resources to set breakpoint on.
- `columnNumber`: This can be nil. (Optional) Offset in the line to set breakpoint at.
- `condition`: This can be nil. (Optional) Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
returns:
- `retBreakpointID`: Id of the created breakpoint for further reference.
- `retLocations`: List of the locations this breakpoint resolved into upon addition.
func (Debugger) SetBreakpointOnFunctionCall ¶
func (doDebugger Debugger) SetBreakpointOnFunctionCall(objectID runtime.RemoteObjectID, condition *string) (retBreakpointID debugger.BreakpointID, err error)
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.
See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setBreakpointOnFunctionCall
parameters:
- `objectID`: Function object id.
- `condition`: This can be nil. (Optional) Expression to use as a breakpoint condition. When specified, debugger will stop on the breakpoint if this expression evaluates to true.
returns:
- `retBreakpointID`: Id of the created breakpoint for further reference.
func (Debugger) SetBreakpointsActive ¶
SetBreakpointsActive activates / deactivates all breakpoints on the page.
See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setBreakpointsActive
parameters:
- `active`: New value for breakpoints active state.
func (Debugger) SetInstrumentationBreakpoint ¶
func (doDebugger Debugger) SetInstrumentationBreakpoint(instrumentation debugger.SetInstrumentationBreakpointInstrumentation) (retBreakpointID debugger.BreakpointID, err error)
SetInstrumentationBreakpoint sets instrumentation breakpoint.
See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setInstrumentationBreakpoint
parameters:
- `instrumentation`: Instrumentation name.
returns:
- `retBreakpointID`: Id of the created breakpoint for further reference.
func (Debugger) SetPauseOnExceptions ¶
func (doDebugger Debugger) SetPauseOnExceptions(state debugger.ExceptionsState) (err error)
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.
See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setPauseOnExceptions
parameters:
- `state`: Pause on exceptions mode.
func (Debugger) SetReturnValue ¶
func (doDebugger Debugger) SetReturnValue(newValue *runtime.CallArgument) (err error)
SetReturnValue changes return value in top frame. Available only at return break position.
See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setReturnValue
parameters:
- `newValue`: New return value.
func (Debugger) SetScriptSource ¶
func (doDebugger Debugger) SetScriptSource(scriptID runtime.ScriptID, scriptSource string, dryRun *bool) (retCallFrames []*debugger.CallFrame, retStackChanged bool, retAsyncStackTrace *runtime.StackTrace, retAsyncStackTraceID *runtime.StackTraceID, retExceptionDetails *runtime.ExceptionDetails, err error)
SetScriptSource edits JavaScript source live.
See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setScriptSource
parameters:
- `scriptID`: Id of the script to edit.
- `scriptSource`: New content of the script.
- `dryRun`: This can be nil. (Optional) If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code.
returns:
- `retCallFrames`: New stack trace in case editing has happened while VM was stopped.
- `retStackChanged`: Whether current call stack was modified after applying the changes.
- `retAsyncStackTrace`: Async stack trace, if any.
- `retAsyncStackTraceID`: Async stack trace, if any.
- `retExceptionDetails`: Exception details if any.
func (Debugger) SetSkipAllPauses ¶
SetSkipAllPauses makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setSkipAllPauses
parameters:
- `skip`: New value for skip pauses state.
func (Debugger) SetVariableValue ¶
func (doDebugger Debugger) SetVariableValue(scopeNumber int64, variableName string, newValue *runtime.CallArgument, callFrameID debugger.CallFrameID) (err error)
SetVariableValue changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.
See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setVariableValue
parameters:
- `scopeNumber`: 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually.
- `variableName`: Variable name.
- `newValue`: New variable value.
- `callFrameID`: Id of callframe that holds variable.
func (Debugger) StepInto ¶
StepInto steps into the function call.
See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-stepInto
parameters:
- `breakOnAsyncCall`: This can be nil. (Optional) Debugger will pause on the execution of the first async task which was scheduled before next pause.
func (Debugger) StepOut ¶
StepOut steps out of the function call.
See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-stepOut
func (Debugger) StepOver ¶
StepOver steps over the statement.
See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-stepOver
type DeviceOrientation ¶
type DeviceOrientation struct {
// contains filtered or unexported fields
}
DeviceOrientation executes a cdproto command under DeviceOrientation domain.
func (DeviceOrientation) ClearDeviceOrientationOverride ¶
func (doDeviceOrientation DeviceOrientation) ClearDeviceOrientationOverride() (err error)
ClearDeviceOrientationOverride clears the overridden Device Orientation.
func (DeviceOrientation) SetDeviceOrientationOverride ¶
func (doDeviceOrientation DeviceOrientation) SetDeviceOrientationOverride(alpha float64, beta float64, gamma float64) (err error)
SetDeviceOrientationOverride overrides the Device Orientation.
parameters:
- `alpha`: Mock alpha
- `beta`: Mock beta
- `gamma`: Mock gamma
type Domain ¶
type Domain struct {
// contains filtered or unexported fields
}
Domain executes a cdproto command against a chromedp context.
func Do ¶
Do makes a Domain that executes a cdproto command against a chromedp context. Set up arg `ctxWithExecutor` with `cdp.WithExecutor()` and `chromedp.FromContext()` beforehand.
func (Domain) Accessibility ¶
func (d Domain) Accessibility() Accessibility
Accessibility executes a cdproto command under Accessibility domain.
func (Domain) ApplicationCache ¶
func (d Domain) ApplicationCache() ApplicationCache
ApplicationCache executes a cdproto command under ApplicationCache domain.
func (Domain) BackgroundService ¶
func (d Domain) BackgroundService() BackgroundService
BackgroundService executes a cdproto command under BackgroundService domain.
func (Domain) CacheStorage ¶
func (d Domain) CacheStorage() CacheStorage
CacheStorage executes a cdproto command under CacheStorage domain.
func (Domain) DOMDebugger ¶
func (d Domain) DOMDebugger() DOMDebugger
DOMDebugger executes a cdproto command under DOMDebugger domain.
func (Domain) DOMSnapshot ¶
func (d Domain) DOMSnapshot() DOMSnapshot
DOMSnapshot executes a cdproto command under DOMSnapshot domain.
func (Domain) DOMStorage ¶
func (d Domain) DOMStorage() DOMStorage
DOMStorage executes a cdproto command under DOMStorage domain.
func (Domain) DeviceOrientation ¶
func (d Domain) DeviceOrientation() DeviceOrientation
DeviceOrientation executes a cdproto command under DeviceOrientation domain.
func (Domain) HeadlessExperimental ¶
func (d Domain) HeadlessExperimental() HeadlessExperimental
HeadlessExperimental executes a cdproto command under HeadlessExperimental domain.
func (Domain) HeapProfiler ¶
func (d Domain) HeapProfiler() HeapProfiler
HeapProfiler executes a cdproto command under HeapProfiler domain.
func (Domain) Performance ¶
func (d Domain) Performance() Performance
Performance executes a cdproto command under Performance domain.
func (Domain) ServiceWorker ¶
func (d Domain) ServiceWorker() ServiceWorker
ServiceWorker executes a cdproto command under ServiceWorker domain.
func (Domain) SystemInfo ¶
func (d Domain) SystemInfo() SystemInfo
SystemInfo executes a cdproto command under SystemInfo domain.
type Emulation ¶
type Emulation struct {
// contains filtered or unexported fields
}
Emulation executes a cdproto command under Emulation domain.
func (Emulation) CanEmulate ¶
CanEmulate tells whether emulation is supported.
See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-canEmulate
returns:
- `retResult`: True if emulation is supported.
func (Emulation) ClearDeviceMetricsOverride ¶
ClearDeviceMetricsOverride clears the overridden device metrics.
See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-clearDeviceMetricsOverride
func (Emulation) ClearGeolocationOverride ¶
ClearGeolocationOverride clears the overridden Geolocation Position and Error.
See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-clearGeolocationOverride
func (Emulation) ResetPageScaleFactor ¶
ResetPageScaleFactor requests that page scale factor is reset to initial values.
See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-resetPageScaleFactor
func (Emulation) SetCPUThrottlingRate ¶
SetCPUThrottlingRate enables CPU throttling to emulate slow CPUs.
See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setCPUThrottlingRate
parameters:
- `rate`: Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).
func (Emulation) SetDefaultBackgroundColorOverride ¶
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.
parameters:
- `color`: This can be nil. (Optional) RGBA of the default background color. If not specified, any existing override will be cleared.
func (Emulation) SetDeviceMetricsOverride ¶
func (doEmulation Emulation) SetDeviceMetricsOverride(width int64, height int64, deviceScaleFactor float64, mobile bool, scale *float64, screenWidth *int64, screenHeight *int64, positionX *int64, positionY *int64, dontSetVisibleSize *bool, screenOrientation *emulation.ScreenOrientation, viewport *page.Viewport) (err error)
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).
See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setDeviceMetricsOverride
parameters:
- `width`: Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
- `height`: Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
- `deviceScaleFactor`: Overriding device scale factor value. 0 disables the override.
- `mobile`: Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more.
- `scale`: This can be nil. (Optional) Scale to apply to resulting view image.
- `screenWidth`: This can be nil. (Optional) Overriding screen width value in pixels (minimum 0, maximum 10000000).
- `screenHeight`: This can be nil. (Optional) Overriding screen height value in pixels (minimum 0, maximum 10000000).
- `positionX`: This can be nil. (Optional) Overriding view X position on screen in pixels (minimum 0, maximum 10000000).
- `positionY`: This can be nil. (Optional) Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).
- `dontSetVisibleSize`: This can be nil. (Optional) Do not set visible view size, rely upon explicit setVisibleSize call.
- `screenOrientation`: This can be nil. (Optional) Screen orientation override.
- `viewport`: This can be nil. (Optional) If set, the visible area of the page will be overridden to this viewport. This viewport change is not observed by the page, e.g. viewport-relative elements do not change positions.
func (Emulation) SetDocumentCookieDisabled ¶
SetDocumentCookieDisabled [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setDocumentCookieDisabled
parameters:
- `disabled`: Whether document.coookie API should be disabled.
func (Emulation) SetEmitTouchEventsForMouse ¶
func (doEmulation Emulation) SetEmitTouchEventsForMouse(enabled bool, configuration *emulation.SetEmitTouchEventsForMouseConfiguration) (err error)
SetEmitTouchEventsForMouse [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setEmitTouchEventsForMouse
parameters:
- `enabled`: Whether touch emulation based on mouse input should be enabled.
- `configuration`: This can be nil. (Optional) Touch/gesture events configuration. Default: current platform.
func (Emulation) SetEmulatedMedia ¶
func (doEmulation Emulation) SetEmulatedMedia(media *string, features []*emulation.MediaFeature) (err error)
SetEmulatedMedia emulates the given media type or media feature for CSS media queries.
See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setEmulatedMedia
parameters:
- `media`: This can be nil. (Optional) Media type to emulate. Empty string disables the override.
- `features`: This can be nil. (Optional) Media features to emulate.
func (Emulation) SetFocusEmulationEnabled ¶
SetFocusEmulationEnabled enables or disables simulating a focused and active page.
See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setFocusEmulationEnabled
parameters:
- `enabled`: Whether to enable to disable focus emulation.
func (Emulation) SetGeolocationOverride ¶
func (doEmulation Emulation) SetGeolocationOverride(latitude *float64, longitude *float64, accuracy *float64) (err error)
SetGeolocationOverride overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.
See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setGeolocationOverride
parameters:
- `latitude`: This can be nil. (Optional) Mock latitude
- `longitude`: This can be nil. (Optional) Mock longitude
- `accuracy`: This can be nil. (Optional) Mock accuracy
func (Emulation) SetPageScaleFactor ¶
SetPageScaleFactor sets a specified page scale factor.
See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setPageScaleFactor
parameters:
- `pageScaleFactor`: Page scale factor.
func (Emulation) SetScriptExecutionDisabled ¶
SetScriptExecutionDisabled switches script execution in the page.
See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setScriptExecutionDisabled
parameters:
- `value`: Whether script execution should be disabled in the page.
func (Emulation) SetScrollbarsHidden ¶
SetScrollbarsHidden [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setScrollbarsHidden
parameters:
- `hidden`: Whether scrollbars should be always hidden.
func (Emulation) SetTimezoneOverride ¶
SetTimezoneOverride overrides default host system timezone with the specified one.
See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setTimezoneOverride
parameters:
- `timezoneID`: The timezone identifier. If empty, disables the override and restores default host system timezone.
func (Emulation) SetTouchEmulationEnabled ¶
func (doEmulation Emulation) SetTouchEmulationEnabled(enabled bool, maxTouchPoints *int64) (err error)
SetTouchEmulationEnabled enables touch on platforms which do not support them.
See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setTouchEmulationEnabled
parameters:
- `enabled`: Whether the touch event emulation should be enabled.
- `maxTouchPoints`: This can be nil. (Optional) Maximum touch points supported. Defaults to one.
func (Emulation) SetUserAgentOverride ¶
func (doEmulation Emulation) SetUserAgentOverride(userAgent string, acceptLanguage *string, platform *string) (err error)
SetUserAgentOverride allows overriding user agent with the given string.
See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setUserAgentOverride
parameters:
- `userAgent`: User agent to use.
- `acceptLanguage`: This can be nil. (Optional) Browser langugage to emulate.
- `platform`: This can be nil. (Optional) The platform navigator.platform should return.
func (Emulation) SetVirtualTimePolicy ¶
func (doEmulation Emulation) SetVirtualTimePolicy(policy emulation.VirtualTimePolicy, budget *float64, maxVirtualTimeTaskStarvationCount *int64, waitForNavigation *bool, initialVirtualTime *cdp.TimeSinceEpoch) (retVirtualTimeTicksBase float64, err error)
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.
See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setVirtualTimePolicy
parameters:
- `policy`
- `budget`: This can be nil. (Optional) If set, after this many virtual milliseconds have elapsed virtual time will be paused and a virtualTimeBudgetExpired event is sent.
- `maxVirtualTimeTaskStarvationCount`: This can be nil. (Optional) If set this specifies the maximum number of tasks that can be run before virtual is forced forwards to prevent deadlock.
- `waitForNavigation`: This can be nil. (Optional) If set the virtual time policy change should be deferred until any frame starts navigating. Note any previous deferred policy change is superseded.
- `initialVirtualTime`: This can be nil. (Optional) If set, base::Time::Now will be overridden to initially return this value.
returns:
- `retVirtualTimeTicksBase`: Absolute timestamp at which virtual time was first enabled (up time in milliseconds).
type Fetch ¶
type Fetch struct {
// contains filtered or unexported fields
}
Fetch executes a cdproto command under Fetch domain.
func (Fetch) ContinueRequest ¶
func (doFetch Fetch) ContinueRequest(requestID fetch.RequestID, url *string, method *string, postData *string, headers []*fetch.HeaderEntry) (err error)
ContinueRequest continues the request, optionally modifying some of its parameters.
See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#method-continueRequest
parameters:
- `requestID`: An id the client received in requestPaused event.
- `url`: This can be nil. (Optional) If set, the request url will be modified in a way that's not observable by page.
- `method`: This can be nil. (Optional) If set, the request method is overridden.
- `postData`: This can be nil. (Optional) If set, overrides the post data in the request.
- `headers`: This can be nil. (Optional) If set, overrides the request headrts.
func (Fetch) ContinueWithAuth ¶
func (doFetch Fetch) ContinueWithAuth(requestID fetch.RequestID, authChallengeResponse *fetch.AuthChallengeResponse) (err error)
ContinueWithAuth continues a request supplying authChallengeResponse following authRequired event.
See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#method-continueWithAuth
parameters:
- `requestID`: An id the client received in authRequired event.
- `authChallengeResponse`: Response to with an authChallenge.
func (Fetch) Disable ¶
Disable disables the fetch domain.
See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#method-disable
func (Fetch) Enable ¶
func (doFetch Fetch) Enable(patterns []*fetch.RequestPattern, handleAuthRequests *bool) (err error)
Enable enables issuing of requestPaused events. A request will be paused until client calls one of failRequest, fulfillRequest or continueRequest/continueWithAuth.
See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#method-enable
parameters:
- `patterns`: This can be nil. (Optional) If specified, only requests matching any of these patterns will produce fetchRequested event and will be paused until clients response. If not set, all requests will be affected.
- `handleAuthRequests`: This can be nil. (Optional) If true, authRequired events will be issued and requests will be paused expecting a call to continueWithAuth.
func (Fetch) FailRequest ¶
func (doFetch Fetch) FailRequest(requestID fetch.RequestID, errorReason network.ErrorReason) (err error)
FailRequest causes the request to fail with specified reason.
See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#method-failRequest
parameters:
- `requestID`: An id the client received in requestPaused event.
- `errorReason`: Causes the request to fail with the given reason.
func (Fetch) FulfillRequest ¶
func (doFetch Fetch) FulfillRequest(requestID fetch.RequestID, responseCode int64, responseHeaders []*fetch.HeaderEntry, binaryResponseHeaders *string, body *string, responsePhrase *string) (err error)
FulfillRequest provides response to the request.
See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#method-fulfillRequest
parameters:
- `requestID`: An id the client received in requestPaused event.
- `responseCode`: An HTTP response code.
- `responseHeaders`: This can be nil. (Optional) Response headers.
- `binaryResponseHeaders`: This can be nil. (Optional) Alternative way of specifying response headers as a \0-separated series of name: value pairs. Prefer the above method unless you need to represent some non-UTF8 values that can't be transmitted over the protocol as text.
- `body`: This can be nil. (Optional) A response body.
- `responsePhrase`: This can be nil. (Optional) A textual representation of responseCode. If absent, a standard phrase matching responseCode is used.
func (Fetch) GetResponseBody ¶
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.
See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#method-getResponseBody
parameters:
- `requestID`: Identifier for the intercepted request to get body for.
returns:
- `retBody`: Response body.
func (Fetch) TakeResponseBodyAsStream ¶
func (doFetch Fetch) TakeResponseBodyAsStream(requestID fetch.RequestID) (retStream io.StreamHandle, err error)
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.
See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#method-takeResponseBodyAsStream
parameters:
- `requestID`
returns:
- `retStream`
type HAR ¶
type HAR struct {
// contains filtered or unexported fields
}
HAR executes a cdproto command under HAR domain.
type HeadlessExperimental ¶
type HeadlessExperimental struct {
// contains filtered or unexported fields
}
HeadlessExperimental executes a cdproto command under HeadlessExperimental domain.
func (HeadlessExperimental) BeginFrame ¶
func (doHeadlessExperimental HeadlessExperimental) BeginFrame(frameTimeTicks *float64, interval *float64, noDisplayUpdates *bool, screenshot *headlessexperimental.ScreenshotParams) (retHasDamage bool, retScreenshotData []byte, err error)
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.
See: https://chromedevtools.github.io/devtools-protocol/tot/HeadlessExperimental#method-beginFrame
parameters:
- `frameTimeTicks`: This can be nil. (Optional) Timestamp of this BeginFrame in Renderer TimeTicks (milliseconds of uptime). If not set, the current time will be used.
- `interval`: This can be nil. (Optional) The interval between BeginFrames that is reported to the compositor, in milliseconds. Defaults to a 60 frames/second interval, i.e. about 16.666 milliseconds.
- `noDisplayUpdates`: This can be nil. (Optional) Whether updates should not be committed and drawn onto the display. False by default. If true, only side effects of the BeginFrame will be run, such as layout and animations, but any visual updates may not be visible on the display or in screenshots.
- `screenshot`: This can be nil. (Optional) If set, a screenshot of the frame will be captured and returned in the response. Otherwise, no screenshot will be captured. Note that capturing a screenshot can fail, for example, during renderer initialization. In such a case, no screenshot data will be returned.
returns:
- `retHasDamage`: Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the display. Reported for diagnostic uses, may be removed in the future.
- `retScreenshotData`: Base64-encoded image data of the screenshot, if one was requested and successfully taken.
func (HeadlessExperimental) Disable ¶
func (doHeadlessExperimental HeadlessExperimental) Disable() (err error)
Disable disables headless events for the target.
See: https://chromedevtools.github.io/devtools-protocol/tot/HeadlessExperimental#method-disable
func (HeadlessExperimental) Enable ¶
func (doHeadlessExperimental HeadlessExperimental) Enable() (err error)
Enable enables headless events for the target.
See: https://chromedevtools.github.io/devtools-protocol/tot/HeadlessExperimental#method-enable
type HeapProfiler ¶
type HeapProfiler struct {
// contains filtered or unexported fields
}
HeapProfiler executes a cdproto command under HeapProfiler domain.
func (HeapProfiler) AddInspectedHeapObject ¶
func (doHeapProfiler HeapProfiler) AddInspectedHeapObject(heapObjectID heapprofiler.HeapSnapshotObjectID) (err error)
AddInspectedHeapObject enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-addInspectedHeapObject
parameters:
- `heapObjectID`: Heap snapshot object id to be accessible by means of $x command line API.
func (HeapProfiler) CollectGarbage ¶
func (doHeapProfiler HeapProfiler) CollectGarbage() (err error)
CollectGarbage [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-collectGarbage
func (HeapProfiler) Disable ¶
func (doHeapProfiler HeapProfiler) Disable() (err error)
Disable [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-disable
func (HeapProfiler) Enable ¶
func (doHeapProfiler HeapProfiler) Enable() (err error)
Enable [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-enable
func (HeapProfiler) GetHeapObjectID ¶
func (doHeapProfiler HeapProfiler) GetHeapObjectID(objectID runtime.RemoteObjectID) (retHeapSnapshotObjectID heapprofiler.HeapSnapshotObjectID, err error)
GetHeapObjectID [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-getHeapObjectId
parameters:
- `objectID`: Identifier of the object to get heap object id for.
returns:
- `retHeapSnapshotObjectID`: Id of the heap snapshot object corresponding to the passed remote object id.
func (HeapProfiler) GetObjectByHeapObjectID ¶
func (doHeapProfiler HeapProfiler) GetObjectByHeapObjectID(objectID heapprofiler.HeapSnapshotObjectID, objectGroup *string) (retResult *runtime.RemoteObject, err error)
GetObjectByHeapObjectID [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-getObjectByHeapObjectId
parameters:
- `objectID`
- `objectGroup`: This can be nil. (Optional) Symbolic group name that can be used to release multiple objects.
returns:
- `retResult`: Evaluation result.
func (HeapProfiler) GetSamplingProfile ¶
func (doHeapProfiler HeapProfiler) GetSamplingProfile() (retProfile *heapprofiler.SamplingHeapProfile, err error)
GetSamplingProfile [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-getSamplingProfile
returns:
- `retProfile`: Return the sampling profile being collected.
func (HeapProfiler) StartSampling ¶
func (doHeapProfiler HeapProfiler) StartSampling(samplingInterval *float64) (err error)
StartSampling [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-startSampling
parameters:
- `samplingInterval`: This can be nil. (Optional) Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.
func (HeapProfiler) StartTrackingHeapObjects ¶
func (doHeapProfiler HeapProfiler) StartTrackingHeapObjects(trackAllocations *bool) (err error)
StartTrackingHeapObjects [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-startTrackingHeapObjects
parameters:
- `trackAllocations`
func (HeapProfiler) StopSampling ¶
func (doHeapProfiler HeapProfiler) StopSampling() (retProfile *heapprofiler.SamplingHeapProfile, err error)
StopSampling [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-stopSampling
returns:
- `retProfile`: Recorded sampling heap profile.
func (HeapProfiler) StopTrackingHeapObjects ¶
func (doHeapProfiler HeapProfiler) StopTrackingHeapObjects(reportProgress *bool, treatGlobalObjectsAsRoots *bool) (err error)
StopTrackingHeapObjects [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-stopTrackingHeapObjects
parameters:
- `reportProgress`: This can be nil. (Optional) If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.
- `treatGlobalObjectsAsRoots`
func (HeapProfiler) TakeHeapSnapshot ¶
func (doHeapProfiler HeapProfiler) TakeHeapSnapshot(reportProgress *bool, treatGlobalObjectsAsRoots *bool) (err error)
TakeHeapSnapshot [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-takeHeapSnapshot
parameters:
- `reportProgress`: This can be nil. (Optional) If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
- `treatGlobalObjectsAsRoots`: This can be nil. (Optional) If true, a raw snapshot without artificial roots will be generated
type IO ¶
type IO struct {
// contains filtered or unexported fields
}
IO executes a cdproto command under IO domain.
func (IO) Close ¶
func (doIO IO) Close(handle io.StreamHandle) (err error)
Close close the stream, discard any temporary backing storage.
See: https://chromedevtools.github.io/devtools-protocol/tot/IO#method-close
parameters:
- `handle`: Handle of the stream to close.
func (IO) Read ¶
func (doIO IO) Read(handle io.StreamHandle, offset *int64, size *int64) (retData string, retEOF bool, err error)
Read read a chunk of the stream.
See: https://chromedevtools.github.io/devtools-protocol/tot/IO#method-read
parameters:
- `handle`: Handle of the stream to read.
- `offset`: This can be nil. (Optional) Seek to the specified offset before reading (if not specificed, proceed with offset following the last read). Some types of streams may only support sequential reads.
- `size`: This can be nil. (Optional) Maximum number of bytes to read (left upon the agent discretion if not specified).
returns:
- `retData`: Data that were read.
- `retEOF`: Set if the end-of-file condition occurred while reading.
func (IO) ResolveBlob ¶
func (doIO IO) ResolveBlob(objectID runtime.RemoteObjectID) (retUUID string, err error)
ResolveBlob return UUID of Blob object specified by a remote object id.
See: https://chromedevtools.github.io/devtools-protocol/tot/IO#method-resolveBlob
parameters:
- `objectID`: Object id of a Blob object wrapper.
returns:
- `retUUID`: UUID of the specified Blob.
type IndexedDB ¶
type IndexedDB struct {
// contains filtered or unexported fields
}
IndexedDB executes a cdproto command under IndexedDB domain.
func (IndexedDB) ClearObjectStore ¶
func (doIndexedDB IndexedDB) ClearObjectStore(securityOrigin string, databaseName string, objectStoreName string) (err error)
ClearObjectStore clears all entries from an object store.
See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-clearObjectStore
parameters:
- `securityOrigin`: Security origin.
- `databaseName`: Database name.
- `objectStoreName`: Object store name.
func (IndexedDB) DeleteDatabase ¶
DeleteDatabase deletes a database.
See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-deleteDatabase
parameters:
- `securityOrigin`: Security origin.
- `databaseName`: Database name.
func (IndexedDB) DeleteObjectStoreEntries ¶
func (doIndexedDB IndexedDB) DeleteObjectStoreEntries(securityOrigin string, databaseName string, objectStoreName string, keyRange *indexeddb.KeyRange) (err error)
DeleteObjectStoreEntries delete a range of entries from an object store.
See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-deleteObjectStoreEntries
parameters:
- `securityOrigin`
- `databaseName`
- `objectStoreName`
- `keyRange`: Range of entry keys to delete
func (IndexedDB) Disable ¶
Disable disables events from backend.
See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-disable
func (IndexedDB) Enable ¶
Enable enables events from backend.
See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-enable
func (IndexedDB) GetMetadata ¶
func (doIndexedDB IndexedDB) GetMetadata(securityOrigin string, databaseName string, objectStoreName string) (retEntriesCount float64, retKeyGeneratorValue float64, err error)
GetMetadata gets metadata of an object store.
See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-getMetadata
parameters:
- `securityOrigin`: Security origin.
- `databaseName`: Database name.
- `objectStoreName`: Object store name.
returns:
- `retEntriesCount`: the entries count
- `retKeyGeneratorValue`: the current value of key generator, to become the next inserted key into the object store. Valid if objectStore.autoIncrement is true.
func (IndexedDB) RequestData ¶
func (doIndexedDB IndexedDB) RequestData(securityOrigin string, databaseName string, objectStoreName string, indexName string, skipCount int64, pageSize int64, keyRange *indexeddb.KeyRange) (retObjectStoreDataEntries []*indexeddb.DataEntry, retHasMore bool, err error)
RequestData requests data from object store or index.
See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-requestData
parameters:
- `securityOrigin`: Security origin.
- `databaseName`: Database name.
- `objectStoreName`: Object store name.
- `indexName`: Index name, empty string for object store data requests.
- `skipCount`: Number of records to skip.
- `pageSize`: Number of records to fetch.
- `keyRange`: This can be nil. (Optional) Key range.
returns:
- `retObjectStoreDataEntries`: Array of object store data entries.
- `retHasMore`: If true, there are more entries to fetch in the given range.
func (IndexedDB) RequestDatabase ¶
func (doIndexedDB IndexedDB) RequestDatabase(securityOrigin string, databaseName string) (retDatabaseWithObjectStores *indexeddb.DatabaseWithObjectStores, err error)
RequestDatabase requests database with given name in given frame.
See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-requestDatabase
parameters:
- `securityOrigin`: Security origin.
- `databaseName`: Database name.
returns:
- `retDatabaseWithObjectStores`: Database with an array of object stores.
func (IndexedDB) RequestDatabaseNames ¶
func (doIndexedDB IndexedDB) RequestDatabaseNames(securityOrigin string) (retDatabaseNames []string, err error)
RequestDatabaseNames requests database names for given security origin.
See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-requestDatabaseNames
parameters:
- `securityOrigin`: Security origin.
returns:
- `retDatabaseNames`: Database names for origin.
type Input ¶
type Input struct {
// contains filtered or unexported fields
}
Input executes a cdproto command under Input domain.
func (Input) DispatchKeyEvent ¶
func (doInput Input) DispatchKeyEvent(typeVal input.KeyType, modifiers *input.Modifier, timestamp *input.TimeSinceEpoch, text *string, unmodifiedText *string, keyIdentifier *string, code *string, key *string, windowsVirtualKeyCode *int64, nativeVirtualKeyCode *int64, autoRepeat *bool, isKeypad *bool, isSystemKey *bool, location *int64) (err error)
DispatchKeyEvent dispatches a key event to the page.
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchKeyEvent
parameters:
- `type`: Type of the key event.
- `modifiers`: This can be nil. (Optional) Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
- `timestamp`: This can be nil. (Optional) Time at which the event occurred.
- `text`: This can be nil. (Optional) Text as generated by processing a virtual key code with a keyboard layout. Not needed for for keyUp and rawKeyDown events (default: "")
- `unmodifiedText`: This can be nil. (Optional) Text that would have been generated by the keyboard if no modifiers were pressed (except for shift). Useful for shortcut (accelerator) key handling (default: "").
- `keyIdentifier`: This can be nil. (Optional) Unique key identifier (e.g., 'U+0041') (default: "").
- `code`: This can be nil. (Optional) Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: "").
- `key`: This can be nil. (Optional) Unique DOM defined string value describing the meaning of the key in the context of active modifiers, keyboard layout, etc (e.g., 'AltGr') (default: "").
- `windowsVirtualKeyCode`: This can be nil. (Optional) Windows virtual key code (default: 0).
- `nativeVirtualKeyCode`: This can be nil. (Optional) Native virtual key code (default: 0).
- `autoRepeat`: This can be nil. (Optional) Whether the event was generated from auto repeat (default: false).
- `isKeypad`: This can be nil. (Optional) Whether the event was generated from the keypad (default: false).
- `isSystemKey`: This can be nil. (Optional) Whether the event was a system key event (default: false).
- `location`: This can be nil. (Optional) Whether the event was from the left or right side of the keyboard. 1=Left, 2=Right (default: 0).
func (Input) DispatchMouseEvent ¶
func (doInput Input) DispatchMouseEvent(typeVal input.MouseType, x float64, y float64, modifiers *input.Modifier, timestamp *input.TimeSinceEpoch, button *input.MouseButton, buttons *int64, clickCount *int64, deltaX *float64, deltaY *float64, pointerType *input.DispatchMouseEventPointerType) (err error)
DispatchMouseEvent dispatches a mouse event to the page.
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchMouseEvent
parameters:
- `type`: Type of the mouse event.
- `x`: X coordinate of the event relative to the main frame's viewport in CSS pixels.
- `y`: Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
- `modifiers`: This can be nil. (Optional) Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
- `timestamp`: This can be nil. (Optional) Time at which the event occurred.
- `button`: This can be nil. (Optional) Mouse button (default: "none").
- `buttons`: This can be nil. (Optional) A number indicating which buttons are pressed on the mouse when a mouse event is triggered. Left=1, Right=2, Middle=4, Back=8, Forward=16, None=0.
- `clickCount`: This can be nil. (Optional) Number of times the mouse button was clicked (default: 0).
- `deltaX`: This can be nil. (Optional) X delta in CSS pixels for mouse wheel event (default: 0).
- `deltaY`: This can be nil. (Optional) Y delta in CSS pixels for mouse wheel event (default: 0).
- `pointerType`: This can be nil. (Optional) Pointer type (default: "mouse").
func (Input) DispatchTouchEvent ¶
func (doInput Input) DispatchTouchEvent(typeVal input.TouchType, touchPoints []*input.TouchPoint, modifiers *input.Modifier, timestamp *input.TimeSinceEpoch) (err error)
DispatchTouchEvent dispatches a touch event to the page.
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchTouchEvent
parameters:
- `type`: Type of the touch event. TouchEnd and TouchCancel must not contain any touch points, while TouchStart and TouchMove must contains at least one.
- `touchPoints`: Active touch points on the touch device. One event per any changed point (compared to previous touch event in a sequence) is generated, emulating pressing/moving/releasing points one by one.
- `modifiers`: This can be nil. (Optional) Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
- `timestamp`: This can be nil. (Optional) Time at which the event occurred.
func (Input) EmulateTouchFromMouseEvent ¶
func (doInput Input) EmulateTouchFromMouseEvent(typeVal input.MouseType, x int64, y int64, button input.MouseButton, timestamp *input.TimeSinceEpoch, deltaX *float64, deltaY *float64, modifiers *input.Modifier, clickCount *int64) (err error)
EmulateTouchFromMouseEvent emulates touch event from the mouse event parameters.
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-emulateTouchFromMouseEvent
parameters:
- `type`: Type of the mouse event.
- `x`: X coordinate of the mouse pointer in DIP.
- `y`: Y coordinate of the mouse pointer in DIP.
- `button`: Mouse button. Only "none", "left", "right" are supported.
- `timestamp`: This can be nil. (Optional) Time at which the event occurred (default: current time).
- `deltaX`: This can be nil. (Optional) X delta in DIP for mouse wheel event (default: 0).
- `deltaY`: This can be nil. (Optional) Y delta in DIP for mouse wheel event (default: 0).
- `modifiers`: This can be nil. (Optional) Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
- `clickCount`: This can be nil. (Optional) Number of times the mouse button was clicked (default: 0).
func (Input) InsertText ¶
InsertText this method emulates inserting text that doesn't come from a key press, for example an emoji keyboard or an IME.
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-insertText
parameters:
- `text`: The text to insert.
func (Input) SetIgnoreInputEvents ¶
SetIgnoreInputEvents ignores input events (useful while auditing page).
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-setIgnoreInputEvents
parameters:
- `ignore`: Ignores input events processing when set to true.
func (Input) SynthesizePinchGesture ¶
func (doInput Input) SynthesizePinchGesture(x float64, y float64, scaleFactor float64, relativeSpeed *int64, gestureSourceType *input.GestureSourceType) (err error)
SynthesizePinchGesture synthesizes a pinch gesture over a time period by issuing appropriate touch events.
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-synthesizePinchGesture
parameters:
- `x`: X coordinate of the start of the gesture in CSS pixels.
- `y`: Y coordinate of the start of the gesture in CSS pixels.
- `scaleFactor`: Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out).
- `relativeSpeed`: This can be nil. (Optional) Relative pointer speed in pixels per second (default: 800).
- `gestureSourceType`: This can be nil. (Optional) Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type).
func (Input) SynthesizeScrollGesture ¶
func (doInput Input) SynthesizeScrollGesture(x float64, y float64, xDistance *float64, yDistance *float64, xOverscroll *float64, yOverscroll *float64, preventFling *bool, speed *int64, gestureSourceType *input.GestureSourceType, repeatCount *int64, repeatDelayMs *int64, interactionMarkerName *string) (err error)
SynthesizeScrollGesture synthesizes a scroll gesture over a time period by issuing appropriate touch events.
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-synthesizeScrollGesture
parameters:
- `x`: X coordinate of the start of the gesture in CSS pixels.
- `y`: Y coordinate of the start of the gesture in CSS pixels.
- `xDistance`: This can be nil. (Optional) The distance to scroll along the X axis (positive to scroll left).
- `yDistance`: This can be nil. (Optional) The distance to scroll along the Y axis (positive to scroll up).
- `xOverscroll`: This can be nil. (Optional) The number of additional pixels to scroll back along the X axis, in addition to the given distance.
- `yOverscroll`: This can be nil. (Optional) The number of additional pixels to scroll back along the Y axis, in addition to the given distance.
- `preventFling`: This can be nil. (Optional) Prevent fling (default: true).
- `speed`: This can be nil. (Optional) Swipe speed in pixels per second (default: 800).
- `gestureSourceType`: This can be nil. (Optional) Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type).
- `repeatCount`: This can be nil. (Optional) The number of times to repeat the gesture (default: 0).
- `repeatDelayMs`: This can be nil. (Optional) The number of milliseconds delay between each repeat. (default: 250).
- `interactionMarkerName`: This can be nil. (Optional) The name of the interaction markers to generate, if not empty (default: "").
func (Input) SynthesizeTapGesture ¶
func (doInput Input) SynthesizeTapGesture(x float64, y float64, duration *int64, tapCount *int64, gestureSourceType *input.GestureSourceType) (err error)
SynthesizeTapGesture synthesizes a tap gesture over a time period by issuing appropriate touch events.
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-synthesizeTapGesture
parameters:
- `x`: X coordinate of the start of the gesture in CSS pixels.
- `y`: Y coordinate of the start of the gesture in CSS pixels.
- `duration`: This can be nil. (Optional) Duration between touchdown and touchup events in ms (default: 50).
- `tapCount`: This can be nil. (Optional) Number of times to perform the tap (e.g. 2 for double tap, default: 1).
- `gestureSourceType`: This can be nil. (Optional) Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type).
type Inspector ¶
type Inspector struct {
// contains filtered or unexported fields
}
Inspector executes a cdproto command under Inspector domain.
func (Inspector) Disable ¶
Disable disables inspector domain notifications.
See: https://chromedevtools.github.io/devtools-protocol/tot/Inspector#method-disable
func (Inspector) Enable ¶
Enable enables inspector domain notifications.
See: https://chromedevtools.github.io/devtools-protocol/tot/Inspector#method-enable
type LayerTree ¶
type LayerTree struct {
// contains filtered or unexported fields
}
LayerTree executes a cdproto command under LayerTree domain.
func (LayerTree) CompositingReasons ¶
func (doLayerTree LayerTree) CompositingReasons(layerID layertree.LayerID) (retCompositingReasonIds []string, err error)
CompositingReasons provides the reasons why the given layer was composited.
See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-compositingReasons
parameters:
- `layerID`: The id of the layer for which we want to get the reasons it was composited.
returns:
- `retCompositingReasonIds`: A list of strings specifying reason IDs for the given layer to become composited.
func (LayerTree) Disable ¶
Disable disables compositing tree inspection.
See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-disable
func (LayerTree) Enable ¶
Enable enables compositing tree inspection.
See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-enable
func (LayerTree) LoadSnapshot ¶
func (doLayerTree LayerTree) LoadSnapshot(tiles []*layertree.PictureTile) (retSnapshotID layertree.SnapshotID, err error)
LoadSnapshot returns the snapshot identifier.
See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-loadSnapshot
parameters:
- `tiles`: An array of tiles composing the snapshot.
returns:
- `retSnapshotID`: The id of the snapshot.
func (LayerTree) MakeSnapshot ¶
func (doLayerTree LayerTree) MakeSnapshot(layerID layertree.LayerID) (retSnapshotID layertree.SnapshotID, err error)
MakeSnapshot returns the layer snapshot identifier.
See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-makeSnapshot
parameters:
- `layerID`: The id of the layer.
returns:
- `retSnapshotID`: The id of the layer snapshot.
func (LayerTree) ProfileSnapshot ¶
func (doLayerTree LayerTree) ProfileSnapshot(snapshotID layertree.SnapshotID, minRepeatCount *int64, minDuration *float64, clipRect *dom.Rect) (retTimings []layertree.PaintProfile, err error)
ProfileSnapshot [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-profileSnapshot
parameters:
- `snapshotID`: The id of the layer snapshot.
- `minRepeatCount`: This can be nil. (Optional) The maximum number of times to replay the snapshot (1, if not specified).
- `minDuration`: This can be nil. (Optional) The minimum duration (in seconds) to replay the snapshot.
- `clipRect`: This can be nil. (Optional) The clip rectangle to apply when replaying the snapshot.
returns:
- `retTimings`: The array of paint profiles, one per run.
func (LayerTree) ReleaseSnapshot ¶
func (doLayerTree LayerTree) ReleaseSnapshot(snapshotID layertree.SnapshotID) (err error)
ReleaseSnapshot releases layer snapshot captured by the back-end.
See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-releaseSnapshot
parameters:
- `snapshotID`: The id of the layer snapshot.
func (LayerTree) ReplaySnapshot ¶
func (doLayerTree LayerTree) ReplaySnapshot(snapshotID layertree.SnapshotID, fromStep *int64, toStep *int64, scale *float64) (retDataURL string, err error)
ReplaySnapshot replays the layer snapshot and returns the resulting bitmap.
See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-replaySnapshot
parameters:
- `snapshotID`: The id of the layer snapshot.
- `fromStep`: This can be nil. (Optional) The first step to replay from (replay from the very start if not specified).
- `toStep`: This can be nil. (Optional) The last step to replay to (replay till the end if not specified).
- `scale`: This can be nil. (Optional) The scale to apply while replaying (defaults to 1).
returns:
- `retDataURL`: A data: URL for resulting image.
func (LayerTree) SnapshotCommandLog ¶
func (doLayerTree LayerTree) SnapshotCommandLog(snapshotID layertree.SnapshotID) (retCommandLog []easyjson.RawMessage, err error)
SnapshotCommandLog replays the layer snapshot and returns canvas log.
See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-snapshotCommandLog
parameters:
- `snapshotID`: The id of the layer snapshot.
returns:
- `retCommandLog`: The array of canvas function calls.
type Log ¶
type Log struct {
// contains filtered or unexported fields
}
Log executes a cdproto command under Log domain.
func (Log) Clear ¶
Clear clears the log.
See: https://chromedevtools.github.io/devtools-protocol/tot/Log#method-clear
func (Log) Disable ¶
Disable disables log domain, prevents further log entries from being reported to the client.
See: https://chromedevtools.github.io/devtools-protocol/tot/Log#method-disable
func (Log) Enable ¶
Enable enables log domain, sends the entries collected so far to the client by means of the entryAdded notification.
See: https://chromedevtools.github.io/devtools-protocol/tot/Log#method-enable
func (Log) StartViolationsReport ¶
func (doLog Log) StartViolationsReport(config []*log.ViolationSetting) (err error)
StartViolationsReport start violation reporting.
See: https://chromedevtools.github.io/devtools-protocol/tot/Log#method-startViolationsReport
parameters:
- `config`: Configuration for violations.
func (Log) StopViolationsReport ¶
StopViolationsReport stop violation reporting.
See: https://chromedevtools.github.io/devtools-protocol/tot/Log#method-stopViolationsReport
type Media ¶
type Media struct {
// contains filtered or unexported fields
}
Media executes a cdproto command under Media domain.
func (Media) Disable ¶
Disable disables the Media domain.
See: https://chromedevtools.github.io/devtools-protocol/tot/Media#method-disable
func (Media) Enable ¶
Enable enables the Media domain.
See: https://chromedevtools.github.io/devtools-protocol/tot/Media#method-enable
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
Memory executes a cdproto command under Memory domain.
func (Memory) ForciblyPurgeJavaScriptMemory ¶
ForciblyPurgeJavaScriptMemory simulate OomIntervention by purging V8 memory.
See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-forciblyPurgeJavaScriptMemory
func (Memory) GetAllTimeSamplingProfile ¶
func (doMemory Memory) GetAllTimeSamplingProfile() (retProfile *memory.SamplingProfile, err error)
GetAllTimeSamplingProfile retrieve native memory allocations profile collected since renderer process startup.
See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-getAllTimeSamplingProfile
returns:
- `retProfile`
func (Memory) GetBrowserSamplingProfile ¶
func (doMemory Memory) GetBrowserSamplingProfile() (retProfile *memory.SamplingProfile, err error)
GetBrowserSamplingProfile retrieve native memory allocations profile collected since browser process startup.
See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-getBrowserSamplingProfile
returns:
- `retProfile`
func (Memory) GetDOMCounters ¶
func (doMemory Memory) GetDOMCounters() (retDocuments int64, retNodes int64, retJsEventListeners int64, err error)
GetDOMCounters [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-getDOMCounters
returns:
- `retDocuments`
- `retNodes`
- `retJsEventListeners`
func (Memory) GetSamplingProfile ¶
func (doMemory Memory) GetSamplingProfile() (retProfile *memory.SamplingProfile, err error)
GetSamplingProfile retrieve native memory allocations profile collected since last startSampling call.
See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-getSamplingProfile
returns:
- `retProfile`
func (Memory) PrepareForLeakDetection ¶
PrepareForLeakDetection [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-prepareForLeakDetection
func (Memory) SetPressureNotificationsSuppressed ¶
SetPressureNotificationsSuppressed enable/disable suppressing memory pressure notifications in all processes.
parameters:
- `suppressed`: If true, memory pressure notifications will be suppressed.
func (Memory) SimulatePressureNotification ¶
func (doMemory Memory) SimulatePressureNotification(level memory.PressureLevel) (err error)
SimulatePressureNotification simulate a memory pressure notification in all processes.
See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-simulatePressureNotification
parameters:
- `level`: Memory pressure level of the notification.
func (Memory) StartSampling ¶
StartSampling start collecting native memory profile.
See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-startSampling
parameters:
- `samplingInterval`: This can be nil. (Optional) Average number of bytes between samples.
- `suppressRandomness`: This can be nil. (Optional) Do not randomize intervals between samples.
func (Memory) StopSampling ¶
StopSampling stop collecting native memory profile.
See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-stopSampling
type Network ¶
type Network struct {
// contains filtered or unexported fields
}
Network executes a cdproto command under Network domain.
func (Network) ClearBrowserCache ¶
ClearBrowserCache clears browser cache.
See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-clearBrowserCache
func (Network) ClearBrowserCookies ¶
ClearBrowserCookies clears browser cookies.
See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-clearBrowserCookies
func (Network) DeleteCookies ¶
func (doNetwork Network) DeleteCookies(name string, url *string, domain *string, path *string) (err error)
DeleteCookies deletes browser cookies with matching name and url or domain/path pair.
See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-deleteCookies
parameters:
- `name`: Name of the cookies to remove.
- `url`: This can be nil. (Optional) If specified, deletes all the cookies with the given name where domain and path match provided URL.
- `domain`: This can be nil. (Optional) If specified, deletes only cookies with the exact domain.
- `path`: This can be nil. (Optional) If specified, deletes only cookies with the exact path.
func (Network) Disable ¶
Disable disables network tracking, prevents network events from being sent to the client.
See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-disable
func (Network) EmulateNetworkConditions ¶
func (doNetwork Network) EmulateNetworkConditions(offline bool, latency float64, downloadThroughput float64, uploadThroughput float64, connectionType *network.ConnectionType) (err error)
EmulateNetworkConditions activates emulation of network conditions.
See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-emulateNetworkConditions
parameters:
- `offline`: True to emulate internet disconnection.
- `latency`: Minimum latency from request sent to response headers received (ms).
- `downloadThroughput`: Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
- `uploadThroughput`: Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.
- `connectionType`: This can be nil. (Optional) Connection type if known.
func (Network) Enable ¶
func (doNetwork Network) Enable(maxTotalBufferSize *int64, maxResourceBufferSize *int64, maxPostDataSize *int64) (err error)
Enable enables network tracking, network events will now be delivered to the client.
See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-enable
parameters:
- `maxTotalBufferSize`: This can be nil. (Optional) Buffer size in bytes to use when preserving network payloads (XHRs, etc).
- `maxResourceBufferSize`: This can be nil. (Optional) Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc).
- `maxPostDataSize`: This can be nil. (Optional) Longest post body size (in bytes) that would be included in requestWillBeSent notification
func (Network) GetAllCookies ¶
GetAllCookies returns all browser cookies. Depending on the backend support, will return detailed cookie information in the cookies field.
See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-getAllCookies
returns:
- `retCookies`: Array of cookie objects.
func (Network) GetCertificate ¶
GetCertificate returns the DER-encoded certificate.
See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-getCertificate
parameters:
- `origin`: Origin to get certificate for.
returns:
- `retTableNames`
func (Network) GetCookies ¶
GetCookies returns all browser cookies for the current URL. Depending on the backend support, will return detailed cookie information in the cookies field.
See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-getCookies
parameters:
- `urls`: This can be nil. (Optional) The list of URLs for which applicable cookies will be fetched
returns:
- `retCookies`: Array of cookie objects.
func (Network) GetRequestPostData ¶
func (doNetwork Network) GetRequestPostData(requestID network.RequestID) (retPostData string, err error)
GetRequestPostData returns post data sent with the request. Returns an error when no data was sent with the request.
See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-getRequestPostData
parameters:
- `requestID`: Identifier of the network request to get content for.
returns:
- `retPostData`: Request body string, omitting files from multipart requests
func (Network) GetResponseBody ¶
GetResponseBody returns content served for the given request.
See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-getResponseBody
parameters:
- `requestID`: Identifier of the network request to get content for.
returns:
- `retBody`: Response body.
func (Network) GetResponseBodyForInterception ¶
func (doNetwork Network) GetResponseBodyForInterception(interceptionID network.InterceptionID) (retBody []byte, err error)
GetResponseBodyForInterception returns content served for the given currently intercepted request.
See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-getResponseBodyForInterception
parameters:
- `interceptionID`: Identifier for the intercepted request to get body for.
returns:
- `retBody`: Response body.
func (Network) ReplayXHR ¶
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.
See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-replayXHR
parameters:
- `requestID`: Identifier of XHR to replay.
func (Network) SearchInResponseBody ¶
func (doNetwork Network) SearchInResponseBody(requestID network.RequestID, query string, caseSensitive *bool, isRegex *bool) (retResult []*debugger.SearchMatch, err error)
SearchInResponseBody searches for given string in response content.
See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-searchInResponseBody
parameters:
- `requestID`: Identifier of the network response to search.
- `query`: String to search for.
- `caseSensitive`: This can be nil. (Optional) If true, search is case sensitive.
- `isRegex`: This can be nil. (Optional) If true, treats string parameter as regex.
returns:
- `retResult`: List of search matches.
func (Network) SetBlockedURLS ¶
SetBlockedURLS blocks URLs from loading.
See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-setBlockedURLs
parameters:
- `urls`: URL patterns to block. Wildcards ('*') are allowed.
func (Network) SetBypassServiceWorker ¶
SetBypassServiceWorker toggles ignoring of service worker for each request.
See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-setBypassServiceWorker
parameters:
- `bypass`: Bypass service worker and load from network.
func (Network) SetCacheDisabled ¶
SetCacheDisabled toggles ignoring cache for each request. If true, cache will not be used.
See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-setCacheDisabled
parameters:
- `cacheDisabled`: Cache disabled state.
func (Network) SetCookie ¶
func (doNetwork Network) SetCookie(name string, value string, url *string, domain *string, path *string, secure *bool, httpOnly *bool, sameSite *network.CookieSameSite, expires *cdp.TimeSinceEpoch, priority *network.CookiePriority) (retSuccess bool, err error)
SetCookie sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-setCookie
parameters:
- `name`: Cookie name.
- `value`: Cookie value.
- `url`: This can be nil. (Optional) The request-URI to associate with the setting of the cookie. This value can affect the default domain and path values of the created cookie.
- `domain`: This can be nil. (Optional) Cookie domain.
- `path`: This can be nil. (Optional) Cookie path.
- `secure`: This can be nil. (Optional) True if cookie is secure.
- `httpOnly`: This can be nil. (Optional) True if cookie is http-only.
- `sameSite`: This can be nil. (Optional) Cookie SameSite type.
- `expires`: This can be nil. (Optional) Cookie expiration date, session cookie if not set
- `priority`: This can be nil. (Optional) Cookie Priority type.
returns:
- `retSuccess`: True if successfully set cookie.
func (Network) SetCookies ¶
func (doNetwork Network) SetCookies(cookies []*network.CookieParam) (err error)
SetCookies sets given cookies.
See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-setCookies
parameters:
- `cookies`: Cookies to be set.
func (Network) SetDataSizeLimitsForTest ¶
func (doNetwork Network) SetDataSizeLimitsForTest(maxTotalSize int64, maxResourceSize int64) (err error)
SetDataSizeLimitsForTest for testing.
See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-setDataSizeLimitsForTest
parameters:
- `maxTotalSize`: Maximum total buffer size.
- `maxResourceSize`: Maximum per-resource size.
func (Network) SetExtraHTTPHeaders ¶
SetExtraHTTPHeaders specifies whether to always send extra HTTP headers with the requests from this page.
See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-setExtraHTTPHeaders
parameters:
- `headers`: Map with extra HTTP headers.
func (Network) TakeResponseBodyForInterceptionAsStream ¶
func (doNetwork Network) TakeResponseBodyForInterceptionAsStream(interceptionID network.InterceptionID) (retStream io.StreamHandle, err error)
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.
parameters:
- `interceptionID`
returns:
- `retStream`
type Overlay ¶
type Overlay struct {
// contains filtered or unexported fields
}
Overlay executes a cdproto command under Overlay domain.
func (Overlay) Disable ¶
Disable disables domain notifications.
See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-disable
func (Overlay) Enable ¶
Enable enables domain notifications.
See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-enable
func (Overlay) GetHighlightObjectForTest ¶
func (doOverlay Overlay) GetHighlightObjectForTest(nodeID cdp.NodeID, includeDistance *bool, includeStyle *bool) (retHighlight easyjson.RawMessage, err error)
GetHighlightObjectForTest for testing.
See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-getHighlightObjectForTest
parameters:
- `nodeID`: Id of the node to get highlight object for.
- `includeDistance`: This can be nil. (Optional) Whether to include distance info.
- `includeStyle`: This can be nil. (Optional) Whether to include style info.
returns:
- `retHighlight`: Highlight data for the node.
func (Overlay) HideHighlight ¶
HideHighlight hides any highlight.
See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-hideHighlight
func (Overlay) HighlightFrame ¶
func (doOverlay Overlay) HighlightFrame(frameID cdp.FrameID, contentColor *cdp.RGBA, contentOutlineColor *cdp.RGBA) (err error)
HighlightFrame highlights owner element of the frame with given id.
See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-highlightFrame
parameters:
- `frameID`: Identifier of the frame to highlight.
- `contentColor`: This can be nil. (Optional) The content box highlight fill color (default: transparent).
- `contentOutlineColor`: This can be nil. (Optional) The content box highlight outline color (default: transparent).
func (Overlay) HighlightNode ¶
func (doOverlay Overlay) HighlightNode(highlightConfig *overlay.HighlightConfig, nodeID *cdp.NodeID, backendNodeID *cdp.BackendNodeID, objectID *runtime.RemoteObjectID, selector *string) (err error)
HighlightNode highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.
See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-highlightNode
parameters:
- `highlightConfig`: A descriptor for the highlight appearance.
- `nodeID`: This can be nil. (Optional) Identifier of the node to highlight.
- `backendNodeID`: This can be nil. (Optional) Identifier of the backend node to highlight.
- `objectID`: This can be nil. (Optional) JavaScript object id of the node to be highlighted.
- `selector`: This can be nil. (Optional) Selectors to highlight relevant nodes.
func (Overlay) HighlightQuad ¶
func (doOverlay Overlay) HighlightQuad(quad dom.Quad, color *cdp.RGBA, outlineColor *cdp.RGBA) (err error)
HighlightQuad highlights given quad. Coordinates are absolute with respect to the main frame viewport.
See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-highlightQuad
parameters:
- `quad`: Quad to highlight
- `color`: This can be nil. (Optional) The highlight fill color (default: transparent).
- `outlineColor`: This can be nil. (Optional) The highlight outline color (default: transparent).
func (Overlay) HighlightRect ¶
func (doOverlay Overlay) HighlightRect(x int64, y int64, width int64, height int64, color *cdp.RGBA, outlineColor *cdp.RGBA) (err error)
HighlightRect highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.
See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-highlightRect
parameters:
- `x`: X coordinate
- `y`: Y coordinate
- `width`: Rectangle width
- `height`: Rectangle height
- `color`: This can be nil. (Optional) The highlight fill color (default: transparent).
- `outlineColor`: This can be nil. (Optional) The highlight outline color (default: transparent).
func (Overlay) SetInspectMode ¶
func (doOverlay Overlay) SetInspectMode(mode overlay.InspectMode, highlightConfig *overlay.HighlightConfig) (err error)
SetInspectMode enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection.
See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setInspectMode
parameters:
- `mode`: Set an inspection mode.
- `highlightConfig`: This can be nil. (Optional) A descriptor for the highlight appearance of hovered-over nodes. May be omitted if enabled == false.
func (Overlay) SetPausedInDebuggerMessage ¶
SetPausedInDebuggerMessage [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setPausedInDebuggerMessage
parameters:
- `message`: This can be nil. (Optional) The message to display, also triggers resume and step over controls.
func (Overlay) SetShowAdHighlights ¶
SetShowAdHighlights highlights owner element of all frames detected to be ads.
See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowAdHighlights
parameters:
- `show`: True for showing ad highlights
func (Overlay) SetShowDebugBorders ¶
SetShowDebugBorders requests that backend shows debug borders on layers.
See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowDebugBorders
parameters:
- `show`: True for showing debug borders
func (Overlay) SetShowFPSCounter ¶
SetShowFPSCounter requests that backend shows the FPS counter.
See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowFPSCounter
parameters:
- `show`: True for showing the FPS counter
func (Overlay) SetShowHitTestBorders ¶
SetShowHitTestBorders requests that backend shows hit-test borders on layers.
See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowHitTestBorders
parameters:
- `show`: True for showing hit-test borders
func (Overlay) SetShowLayoutShiftRegions ¶
SetShowLayoutShiftRegions requests that backend shows layout shift regions.
See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowLayoutShiftRegions
parameters:
- `result`: True for showing layout shift regions
func (Overlay) SetShowPaintRects ¶
SetShowPaintRects requests that backend shows paint rectangles.
See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowPaintRects
parameters:
- `result`: True for showing paint rectangles
func (Overlay) SetShowScrollBottleneckRects ¶
SetShowScrollBottleneckRects requests that backend shows scroll bottleneck rects.
See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowScrollBottleneckRects
parameters:
- `show`: True for showing scroll bottleneck rects
func (Overlay) SetShowViewportSizeOnResize ¶
SetShowViewportSizeOnResize paints viewport size upon main frame resize.
See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowViewportSizeOnResize
parameters:
- `show`: Whether to paint size or not.
type Page ¶
type Page struct {
// contains filtered or unexported fields
}
Page executes a cdproto command under Page domain.
func (Page) AddCompilationCache ¶
AddCompilationCache seeds compilation cache for given url. Compilation cache does not survive cross-process navigation.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-addCompilationCache
parameters:
- `url`
- `data`: Base64-encoded data
func (Page) AddScriptToEvaluateOnNewDocument ¶
func (doPage Page) AddScriptToEvaluateOnNewDocument(source string, worldName *string) (retIdentifier page.ScriptIdentifier, err error)
AddScriptToEvaluateOnNewDocument evaluates given script in every frame upon creation (before loading frame's scripts).
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-addScriptToEvaluateOnNewDocument
parameters:
- `source`
- `worldName`: This can be nil. (Optional) If specified, creates an isolated world with the given name and evaluates given script in it. This world name will be used as the ExecutionContextDescription::name when the corresponding event is emitted.
returns:
- `retIdentifier`: Identifier of the added script.
func (Page) BringToFront ¶
BringToFront brings page to front (activates tab).
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-bringToFront
func (Page) CaptureScreenshot ¶
func (doPage Page) CaptureScreenshot(format *page.CaptureScreenshotFormat, quality *int64, clip *page.Viewport, fromSurface *bool) (retData []byte, err error)
CaptureScreenshot capture page screenshot.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-captureScreenshot
parameters:
- `format`: This can be nil. (Optional) Image compression format (defaults to png).
- `quality`: This can be nil. (Optional) Compression quality from range [0..100] (jpeg only).
- `clip`: This can be nil. (Optional) Capture the screenshot of a given region only.
- `fromSurface`: This can be nil. (Optional) Capture the screenshot from the surface, rather than the view. Defaults to true.
returns:
- `retData`: Base64-encoded image data.
func (Page) CaptureSnapshot ¶
func (doPage Page) CaptureSnapshot(format *page.CaptureSnapshotFormat) (retData string, err error)
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.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-captureSnapshot
parameters:
- `format`: This can be nil. (Optional) Format (defaults to mhtml).
returns:
- `retData`: Serialized page data.
func (Page) ClearCompilationCache ¶
ClearCompilationCache clears seeded compilation cache.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-clearCompilationCache
func (Page) Close ¶
Close tries to close page, running its beforeunload hooks, if any.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-close
func (Page) Crash ¶
Crash crashes renderer on the IO thread, generates minidumps.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-crash
func (Page) CreateIsolatedWorld ¶
func (doPage Page) CreateIsolatedWorld(frameID cdp.FrameID, worldName *string, grantUniveralAccess *bool) (retExecutionContextID runtime.ExecutionContextID, err error)
CreateIsolatedWorld creates an isolated world for the given frame.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-createIsolatedWorld
parameters:
- `frameID`: Id of the frame in which the isolated world should be created.
- `worldName`: This can be nil. (Optional) An optional name which is reported in the Execution Context.
- `grantUniveralAccess`: This can be nil. (Optional) Whether or not universal access should be granted to the isolated world. This is a powerful option, use with caution.
returns:
- `retExecutionContextID`: Execution context of the isolated world.
func (Page) Disable ¶
Disable disables page domain notifications.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-disable
func (Page) Enable ¶
Enable enables page domain notifications.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-enable
func (Page) GenerateTestReport ¶
GenerateTestReport generates a report for testing.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-generateTestReport
parameters:
- `message`: Message to be displayed in the report.
- `group`: This can be nil. (Optional) Specifies the endpoint group to deliver the report to.
func (Page) GetAppManifest ¶
func (doPage Page) GetAppManifest() (retURL string, retErrors []*page.AppManifestError, retData string, retParsed *page.AppManifestParsedProperties, err error)
GetAppManifest [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getAppManifest
returns:
- `retURL`: Manifest location.
- `retErrors`
- `retData`: Manifest content.
- `retParsed`: Parsed manifest properties
func (Page) GetFrameTree ¶
GetFrameTree returns present frame tree structure.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getFrameTree
returns:
- `retFrameTree`: Present frame tree structure.
func (Page) GetInstallabilityErrors ¶
func (doPage Page) GetInstallabilityErrors() (retInstallabilityErrors []*page.InstallabilityError, err error)
GetInstallabilityErrors [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getInstallabilityErrors
returns:
- `retInstallabilityErrors`
func (Page) GetLayoutMetrics ¶
func (doPage Page) GetLayoutMetrics() (retLayoutViewport *page.LayoutViewport, retVisualViewport *page.VisualViewport, retContentSize *dom.Rect, err error)
GetLayoutMetrics returns metrics relating to the layouting of the page, such as viewport bounds/scale.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getLayoutMetrics
returns:
- `retLayoutViewport`: Metrics relating to the layout viewport.
- `retVisualViewport`: Metrics relating to the visual viewport.
- `retContentSize`: Size of scrollable area.
func (Page) GetManifestIcons ¶
GetManifestIcons [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getManifestIcons
returns:
- `retPrimaryIcon`
func (Page) GetNavigationHistory ¶
func (doPage Page) GetNavigationHistory() (retCurrentIndex int64, retEntries []*page.NavigationEntry, err error)
GetNavigationHistory returns navigation history for the current page.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getNavigationHistory
returns:
- `retCurrentIndex`: Index of the current navigation history entry.
- `retEntries`: Array of navigation history entries.
func (Page) GetResourceContent ¶
func (doPage Page) GetResourceContent(frameID cdp.FrameID, url string) (retContent []byte, err error)
GetResourceContent returns content of the given resource.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getResourceContent
parameters:
- `frameID`: Frame id to get resource for.
- `url`: URL of the resource to get content for.
returns:
- `retContent`: Resource content.
func (Page) GetResourceTree ¶
func (doPage Page) GetResourceTree() (retFrameTree *page.FrameResourceTree, err error)
GetResourceTree returns present frame / resource tree structure.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getResourceTree
returns:
- `retFrameTree`: Present frame / resource tree structure.
func (Page) HandleJavaScriptDialog ¶
HandleJavaScriptDialog accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-handleJavaScriptDialog
parameters:
- `accept`: Whether to accept or dismiss the dialog.
- `promptText`: This can be nil. (Optional) The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog.
func (Page) Navigate ¶
func (doPage Page) Navigate(url string, referrer *string, transitionType *page.TransitionType, frameID *cdp.FrameID) (retFrameID cdp.FrameID, retLoaderID cdp.LoaderID, retErrorText string, err error)
Navigate navigates current page to the given URL.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-navigate
parameters:
- `url`: URL to navigate the page to.
- `referrer`: This can be nil. (Optional) Referrer URL.
- `transitionType`: This can be nil. (Optional) Intended transition type.
- `frameID`: This can be nil. (Optional) Frame id to navigate, if not specified navigates the top frame.
returns:
- `retFrameID`: Frame id that has navigated (or failed to navigate)
- `retLoaderID`: Loader identifier.
- `retErrorText`: User friendly error message, present if and only if navigation has failed.
func (Page) NavigateToHistoryEntry ¶
NavigateToHistoryEntry navigates current page to the given history entry.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-navigateToHistoryEntry
parameters:
- `entryID`: Unique id of the entry to navigate to.
func (Page) PrintToPDF ¶
func (doPage Page) PrintToPDF(landscape *bool, displayHeaderFooter *bool, printBackground *bool, scale *float64, paperWidth *float64, paperHeight *float64, marginTop *float64, marginBottom *float64, marginLeft *float64, marginRight *float64, pageRanges *string, ignoreInvalidPageRanges *bool, headerTemplate *string, footerTemplate *string, preferCSSPageSize *bool, transferMode *page.PrintToPDFTransferMode) (retData []byte, retStream io.StreamHandle, err error)
PrintToPDF print page as PDF.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-printToPDF
parameters:
- `landscape`: This can be nil. (Optional) Paper orientation. Defaults to false.
- `displayHeaderFooter`: This can be nil. (Optional) Display header and footer. Defaults to false.
- `printBackground`: This can be nil. (Optional) Print background graphics. Defaults to false.
- `scale`: This can be nil. (Optional) Scale of the webpage rendering. Defaults to 1.
- `paperWidth`: This can be nil. (Optional) Paper width in inches. Defaults to 8.5 inches.
- `paperHeight`: This can be nil. (Optional) Paper height in inches. Defaults to 11 inches.
- `marginTop`: This can be nil. (Optional) Top margin in inches. Defaults to 1cm (~0.4 inches).
- `marginBottom`: This can be nil. (Optional) Bottom margin in inches. Defaults to 1cm (~0.4 inches).
- `marginLeft`: This can be nil. (Optional) Left margin in inches. Defaults to 1cm (~0.4 inches).
- `marginRight`: This can be nil. (Optional) Right margin in inches. Defaults to 1cm (~0.4 inches).
- `pageRanges`: This can be nil. (Optional) Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages.
- `ignoreInvalidPageRanges`: This can be nil. (Optional) Whether to silently ignore invalid but successfully parsed page ranges, such as '3-2'. Defaults to false.
- `headerTemplate`: This can be nil. (Optional) HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them: - date: formatted print date - title: document title - url: document location - pageNumber: current page number - totalPages: total pages in the document For example, <span class=title></span> would generate span containing the title.
- `footerTemplate`: This can be nil. (Optional) HTML template for the print footer. Should use the same format as the headerTemplate.
- `preferCSSPageSize`: This can be nil. (Optional) Whether or not to prefer page size as defined by css. Defaults to false, in which case the content will be scaled to fit the paper size.
- `transferMode`: This can be nil. (Optional) return as stream
returns:
- `retData`: Base64-encoded pdf data. Empty if |returnAsStream| is specified.
- `retStream`: A handle of the stream that holds resulting PDF data.
func (Page) Reload ¶
Reload reloads given page optionally ignoring the cache.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-reload
parameters:
- `ignoreCache`: This can be nil. (Optional) If true, browser cache is ignored (as if the user pressed Shift+refresh).
- `scriptToEvaluateOnLoad`: This can be nil. (Optional) If set, the script will be injected into all frames of the inspected page after reload. Argument will be ignored if reloading dataURL origin.
func (Page) RemoveScriptToEvaluateOnNewDocument ¶
func (doPage Page) RemoveScriptToEvaluateOnNewDocument(identifier page.ScriptIdentifier) (err error)
RemoveScriptToEvaluateOnNewDocument removes given script from the list.
parameters:
- `identifier`
func (Page) ResetNavigationHistory ¶
ResetNavigationHistory resets navigation history for the current page.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-resetNavigationHistory
func (Page) ScreencastFrameAck ¶
ScreencastFrameAck acknowledges that a screencast frame has been received by the frontend.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-screencastFrameAck
parameters:
- `sessionID`: Frame number.
func (Page) SearchInResource ¶
func (doPage Page) SearchInResource(frameID cdp.FrameID, url string, query string, caseSensitive *bool, isRegex *bool) (retResult []*debugger.SearchMatch, err error)
SearchInResource searches for given string in resource content.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-searchInResource
parameters:
- `frameID`: Frame id for resource to search in.
- `url`: URL of the resource to search in.
- `query`: String to search for.
- `caseSensitive`: This can be nil. (Optional) If true, search is case sensitive.
- `isRegex`: This can be nil. (Optional) If true, treats string parameter as regex.
returns:
- `retResult`: List of search matches.
func (Page) SetAdBlockingEnabled ¶
SetAdBlockingEnabled enable Chrome's experimental ad filter on all sites.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setAdBlockingEnabled
parameters:
- `enabled`: Whether to block ads.
func (Page) SetBypassCSP ¶
SetBypassCSP enable page Content Security Policy by-passing.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setBypassCSP
parameters:
- `enabled`: Whether to bypass page CSP.
func (Page) SetDocumentContent ¶
SetDocumentContent sets given markup as the document's HTML.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setDocumentContent
parameters:
- `frameID`: Frame id to set HTML for.
- `html`: HTML content to set.
func (Page) SetDownloadBehavior ¶
func (doPage Page) SetDownloadBehavior(behavior page.SetDownloadBehaviorBehavior, downloadPath *string) (err error)
SetDownloadBehavior set the behavior when downloading a file.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setDownloadBehavior
parameters:
- `behavior`: Whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny).
- `downloadPath`: This can be nil. (Optional) The default path to save downloaded files to. This is required if behavior is set to 'allow'
func (Page) SetFontFamilies ¶
func (doPage Page) SetFontFamilies(fontFamilies *page.FontFamilies) (err error)
SetFontFamilies set generic font families.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setFontFamilies
parameters:
- `fontFamilies`: Specifies font families to set. If a font family is not specified, it won't be changed.
func (Page) SetFontSizes ¶
SetFontSizes set default font sizes.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setFontSizes
parameters:
- `fontSizes`: Specifies font sizes to set. If a font size is not specified, it won't be changed.
func (Page) SetInterceptFileChooserDialog ¶
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.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setInterceptFileChooserDialog
parameters:
- `enabled`
func (Page) SetLifecycleEventsEnabled ¶
SetLifecycleEventsEnabled controls whether page will emit lifecycle events.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setLifecycleEventsEnabled
parameters:
- `enabled`: If true, starts emitting lifecycle events.
func (Page) SetProduceCompilationCache ¶
SetProduceCompilationCache forces compilation cache to be generated for every subresource script.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setProduceCompilationCache
parameters:
- `enabled`
func (Page) SetWebLifecycleState ¶
func (doPage Page) SetWebLifecycleState(state page.SetWebLifecycleStateState) (err error)
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/.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setWebLifecycleState
parameters:
- `state`: Target lifecycle state
func (Page) StartScreencast ¶
func (doPage Page) StartScreencast(format *page.ScreencastFormat, quality *int64, maxWidth *int64, maxHeight *int64, everyNthFrame *int64) (err error)
StartScreencast starts sending each frame using the screencastFrame event.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-startScreencast
parameters:
- `format`: This can be nil. (Optional) Image compression format.
- `quality`: This can be nil. (Optional) Compression quality from range [0..100].
- `maxWidth`: This can be nil. (Optional) Maximum screenshot width.
- `maxHeight`: This can be nil. (Optional) Maximum screenshot height.
- `everyNthFrame`: This can be nil. (Optional) Send every n-th frame.
func (Page) StopLoading ¶
StopLoading force the page stop all navigations and pending resource fetches.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-stopLoading
func (Page) StopScreencast ¶
StopScreencast stops sending each frame in the screencastFrame.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-stopScreencast
func (Page) WaitForDebugger ¶
WaitForDebugger pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-waitForDebugger
type Performance ¶
type Performance struct {
// contains filtered or unexported fields
}
Performance executes a cdproto command under Performance domain.
func (Performance) Disable ¶
func (doPerformance Performance) Disable() (err error)
Disable disable collecting and reporting metrics.
See: https://chromedevtools.github.io/devtools-protocol/tot/Performance#method-disable
func (Performance) Enable ¶
func (doPerformance Performance) Enable() (err error)
Enable enable collecting and reporting metrics.
See: https://chromedevtools.github.io/devtools-protocol/tot/Performance#method-enable
func (Performance) GetMetrics ¶
func (doPerformance Performance) GetMetrics() (retMetrics []*performance.Metric, err error)
GetMetrics retrieve current values of run-time metrics.
See: https://chromedevtools.github.io/devtools-protocol/tot/Performance#method-getMetrics
returns:
- `retMetrics`: Current values for run-time metrics.
func (Performance) SetTimeDomain ¶
func (doPerformance Performance) SetTimeDomain(timeDomain performance.SetTimeDomainTimeDomain) (err error)
SetTimeDomain 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.
See: https://chromedevtools.github.io/devtools-protocol/tot/Performance#method-setTimeDomain
parameters:
- `timeDomain`: Time domain
type Profiler ¶
type Profiler struct {
// contains filtered or unexported fields
}
Profiler executes a cdproto command under Profiler domain.
func (Profiler) Disable ¶
Disable [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-disable
func (Profiler) DisableRuntimeCallStats ¶
DisableRuntimeCallStats disable run time call stats collection.
See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-disableRuntimeCallStats
func (Profiler) Enable ¶
Enable [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-enable
func (Profiler) EnableRuntimeCallStats ¶
EnableRuntimeCallStats enable run time call stats collection.
See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-enableRuntimeCallStats
func (Profiler) GetBestEffortCoverage ¶
func (doProfiler Profiler) GetBestEffortCoverage() (retResult []*profiler.ScriptCoverage, err error)
GetBestEffortCoverage collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.
See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-getBestEffortCoverage
returns:
- `retResult`: Coverage data for the current isolate.
func (Profiler) GetRuntimeCallStats ¶
func (doProfiler Profiler) GetRuntimeCallStats() (retResult []*profiler.CounterInfo, err error)
GetRuntimeCallStats retrieve run time call stats.
See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-getRuntimeCallStats
returns:
- `retResult`: Collected counter information.
func (Profiler) SetSamplingInterval ¶
SetSamplingInterval changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-setSamplingInterval
parameters:
- `interval`: New sampling interval in microseconds.
func (Profiler) Start ¶
Start [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-start
func (Profiler) StartPreciseCoverage ¶
func (doProfiler Profiler) StartPreciseCoverage(callCount *bool, detailed *bool) (retTimestamp float64, err error)
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.
See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-startPreciseCoverage
parameters:
- `callCount`: This can be nil. (Optional) Collect accurate call counts beyond simple 'covered' or 'not covered'.
- `detailed`: This can be nil. (Optional) Collect block-based coverage.
returns:
- `retTimestamp`: Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
func (Profiler) StartTypeProfile ¶
StartTypeProfile enable type profile.
See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-startTypeProfile
func (Profiler) Stop ¶
Stop [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-stop
returns:
- `retProfile`: Recorded profile.
func (Profiler) StopPreciseCoverage ¶
StopPreciseCoverage disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.
See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-stopPreciseCoverage
func (Profiler) StopTypeProfile ¶
StopTypeProfile disable type profile. Disabling releases type profile data collected so far.
See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-stopTypeProfile
func (Profiler) TakePreciseCoverage ¶
func (doProfiler Profiler) TakePreciseCoverage() (retResult []*profiler.ScriptCoverage, retTimestamp float64, err error)
TakePreciseCoverage collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.
See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-takePreciseCoverage
returns:
- `retResult`: Coverage data for the current isolate.
- `retTimestamp`: Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
func (Profiler) TakeTypeProfile ¶
func (doProfiler Profiler) TakeTypeProfile() (retResult []*profiler.ScriptTypeProfile, err error)
TakeTypeProfile collect type profile.
See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-takeTypeProfile
returns:
- `retResult`: Type profile for all scripts since startTypeProfile() was turned on.
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime executes a cdproto command under Runtime domain.
func (Runtime) AddBinding ¶
func (doRuntime Runtime) AddBinding(name string, executionContextID *runtime.ExecutionContextID) (err error)
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.
See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-addBinding
parameters:
- `name`
- `executionContextID`
func (Runtime) AwaitPromise ¶
func (doRuntime Runtime) AwaitPromise(promiseObjectID runtime.RemoteObjectID, returnByValue *bool, generatePreview *bool) (retResult *runtime.RemoteObject, retExceptionDetails *runtime.ExceptionDetails, err error)
AwaitPromise add handler to promise with given promise object id.
See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-awaitPromise
parameters:
- `promiseObjectID`: Identifier of the promise.
- `returnByValue`: This can be nil. (Optional) Whether the result is expected to be a JSON object that should be sent by value.
- `generatePreview`: This can be nil. (Optional) Whether preview should be generated for the result.
returns:
- `retResult`: Promise result. Will contain rejected value if promise was rejected.
- `retExceptionDetails`: Exception details if stack strace is available.
func (Runtime) CallFunctionOn ¶
func (doRuntime Runtime) CallFunctionOn(functionDeclaration string, objectID *runtime.RemoteObjectID, arguments []*runtime.CallArgument, silent *bool, returnByValue *bool, generatePreview *bool, userGesture *bool, awaitPromise *bool, executionContextID *runtime.ExecutionContextID, objectGroup *string) (retResult *runtime.RemoteObject, retExceptionDetails *runtime.ExceptionDetails, err error)
CallFunctionOn calls function with given declaration on the given object. Object group of the result is inherited from the target object.
See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-callFunctionOn
parameters:
- `functionDeclaration`: Declaration of the function to call.
- `objectID`: This can be nil. (Optional) Identifier of the object to call function on. Either objectId or executionContextId should be specified.
- `arguments`: This can be nil. (Optional) Call arguments. All call arguments must belong to the same JavaScript world as the target object.
- `silent`: This can be nil. (Optional) In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.
- `returnByValue`: This can be nil. (Optional) Whether the result is expected to be a JSON object which should be sent by value.
- `generatePreview`: This can be nil. (Optional) Whether preview should be generated for the result.
- `userGesture`: This can be nil. (Optional) Whether execution should be treated as initiated by user in the UI.
- `awaitPromise`: This can be nil. (Optional) Whether execution should await for resulting value and return once awaited promise is resolved.
- `executionContextID`: This can be nil. (Optional) Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified.
- `objectGroup`: This can be nil. (Optional) Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object.
returns:
- `retResult`: Call result.
- `retExceptionDetails`: Exception details.
func (Runtime) CompileScript ¶
func (doRuntime Runtime) CompileScript(expression string, sourceURL string, persistScript bool, executionContextID *runtime.ExecutionContextID) (retScriptID runtime.ScriptID, retExceptionDetails *runtime.ExceptionDetails, err error)
CompileScript compiles expression.
See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-compileScript
parameters:
- `expression`: Expression to compile.
- `sourceURL`: Source url to be set for the script.
- `persistScript`: Specifies whether the compiled script should be persisted.
- `executionContextID`: This can be nil. (Optional) Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
returns:
- `retScriptID`: Id of the script.
- `retExceptionDetails`: Exception details.
func (Runtime) Disable ¶
Disable disables reporting of execution contexts creation.
See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-disable
func (Runtime) DiscardConsoleEntries ¶
DiscardConsoleEntries discards collected exceptions and console API calls.
See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-discardConsoleEntries
func (Runtime) Enable ¶
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.
See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-enable
func (Runtime) Evaluate ¶
func (doRuntime Runtime) Evaluate(expression string, objectGroup *string, includeCommandLineAPI *bool, silent *bool, contextID *runtime.ExecutionContextID, returnByValue *bool, generatePreview *bool, userGesture *bool, awaitPromise *bool, throwOnSideEffect *bool, timeout *runtime.TimeDelta, disableBreaks *bool, replMode *bool) (retResult *runtime.RemoteObject, retExceptionDetails *runtime.ExceptionDetails, err error)
Evaluate evaluates expression on global object.
See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-evaluate
parameters:
- `expression`: Expression to evaluate.
- `objectGroup`: This can be nil. (Optional) Symbolic group name that can be used to release multiple objects.
- `includeCommandLineAPI`: This can be nil. (Optional) Determines whether Command Line API should be available during the evaluation.
- `silent`: This can be nil. (Optional) In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.
- `contextID`: This can be nil. (Optional) Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
- `returnByValue`: This can be nil. (Optional) Whether the result is expected to be a JSON object that should be sent by value.
- `generatePreview`: This can be nil. (Optional) Whether preview should be generated for the result.
- `userGesture`: This can be nil. (Optional) Whether execution should be treated as initiated by user in the UI.
- `awaitPromise`: This can be nil. (Optional) Whether execution should await for resulting value and return once awaited promise is resolved.
- `throwOnSideEffect`: This can be nil. (Optional) Whether to throw an exception if side effect cannot be ruled out during evaluation. This implies disableBreaks below.
- `timeout`: This can be nil. (Optional) Terminate execution after timing out (number of milliseconds).
- `disableBreaks`: This can be nil. (Optional) Disable breakpoints during execution.
- `replMode`: This can be nil. (Optional) Reserved flag for future REPL mode support. Setting this flag has currently no effect.
returns:
- `retResult`: Evaluation result.
- `retExceptionDetails`: Exception details.
func (Runtime) GetHeapUsage ¶
GetHeapUsage returns the JavaScript heap usage. It is the total usage of the corresponding isolate not scoped to a particular Runtime.
See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-getHeapUsage
returns:
- `retUsedSize`: Used heap size in bytes.
- `retTotalSize`: Allocated heap size in bytes.
func (Runtime) GetIsolateID ¶
GetIsolateID returns the isolate id.
See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-getIsolateId
returns:
- `retID`: The isolate id.
func (Runtime) GetProperties ¶
func (doRuntime Runtime) GetProperties(objectID runtime.RemoteObjectID, ownProperties *bool, accessorPropertiesOnly *bool, generatePreview *bool) (retResult []*runtime.PropertyDescriptor, retInternalProperties []*runtime.InternalPropertyDescriptor, retPrivateProperties []*runtime.PrivatePropertyDescriptor, retExceptionDetails *runtime.ExceptionDetails, err error)
GetProperties returns properties of a given object. Object group of the result is inherited from the target object.
See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-getProperties
parameters:
- `objectID`: Identifier of the object to return properties for.
- `ownProperties`: This can be nil. (Optional) If true, returns properties belonging only to the element itself, not to its prototype chain.
- `accessorPropertiesOnly`: This can be nil. (Optional) If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.
- `generatePreview`: This can be nil. (Optional) Whether preview should be generated for the results.
returns:
- `retResult`: Object properties.
- `retInternalProperties`: Internal object properties (only of the element itself).
- `retPrivateProperties`: Object private properties.
- `retExceptionDetails`: Exception details.
func (Runtime) GlobalLexicalScopeNames ¶
func (doRuntime Runtime) GlobalLexicalScopeNames(executionContextID *runtime.ExecutionContextID) (retNames []string, err error)
GlobalLexicalScopeNames returns all let, const and class variables from global scope.
See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-globalLexicalScopeNames
parameters:
- `executionContextID`: This can be nil. (Optional) Specifies in which execution context to lookup global scope variables.
returns:
- `retNames`
func (Runtime) QueryObjects ¶
func (doRuntime Runtime) QueryObjects(prototypeObjectID runtime.RemoteObjectID, objectGroup *string) (retObjects *runtime.RemoteObject, err error)
QueryObjects [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-queryObjects
parameters:
- `prototypeObjectID`: Identifier of the prototype to return objects for.
- `objectGroup`: This can be nil. (Optional) Symbolic group name that can be used to release the results.
returns:
- `retObjects`: Array with objects.
func (Runtime) ReleaseObject ¶
func (doRuntime Runtime) ReleaseObject(objectID runtime.RemoteObjectID) (err error)
ReleaseObject releases remote object with given id.
See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-releaseObject
parameters:
- `objectID`: Identifier of the object to release.
func (Runtime) ReleaseObjectGroup ¶
ReleaseObjectGroup releases all remote objects that belong to a given group.
See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-releaseObjectGroup
parameters:
- `objectGroup`: Symbolic object group name.
func (Runtime) RemoveBinding ¶
RemoveBinding this method does not remove binding function from global object but unsubscribes current runtime agent from Runtime.bindingCalled notifications.
See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-removeBinding
parameters:
- `name`
func (Runtime) RunIfWaitingForDebugger ¶
RunIfWaitingForDebugger tells inspected instance to run if it was waiting for debugger to attach.
See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-runIfWaitingForDebugger
func (Runtime) RunScript ¶
func (doRuntime Runtime) RunScript(scriptID runtime.ScriptID, executionContextID *runtime.ExecutionContextID, objectGroup *string, silent *bool, includeCommandLineAPI *bool, returnByValue *bool, generatePreview *bool, awaitPromise *bool) (retResult *runtime.RemoteObject, retExceptionDetails *runtime.ExceptionDetails, err error)
RunScript runs script with given id in a given context.
See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-runScript
parameters:
- `scriptID`: Id of the script to run.
- `executionContextID`: This can be nil. (Optional) Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
- `objectGroup`: This can be nil. (Optional) Symbolic group name that can be used to release multiple objects.
- `silent`: This can be nil. (Optional) In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.
- `includeCommandLineAPI`: This can be nil. (Optional) Determines whether Command Line API should be available during the evaluation.
- `returnByValue`: This can be nil. (Optional) Whether the result is expected to be a JSON object which should be sent by value.
- `generatePreview`: This can be nil. (Optional) Whether preview should be generated for the result.
- `awaitPromise`: This can be nil. (Optional) Whether execution should await for resulting value and return once awaited promise is resolved.
returns:
- `retResult`: Run result.
- `retExceptionDetails`: Exception details.
func (Runtime) SetCustomObjectFormatterEnabled ¶
SetCustomObjectFormatterEnabled [no description].
parameters:
- `enabled`
func (Runtime) SetMaxCallStackSizeToCapture ¶
SetMaxCallStackSizeToCapture [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-setMaxCallStackSizeToCapture
parameters:
- `size`
func (Runtime) TerminateExecution ¶
TerminateExecution terminate current or next JavaScript execution. Will cancel the termination when the outer-most script execution ends.
See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-terminateExecution
type Security ¶
type Security struct {
// contains filtered or unexported fields
}
Security executes a cdproto command under Security domain.
func (Security) Disable ¶
Disable disables tracking security state changes.
See: https://chromedevtools.github.io/devtools-protocol/tot/Security#method-disable
func (Security) Enable ¶
Enable enables tracking security state changes.
See: https://chromedevtools.github.io/devtools-protocol/tot/Security#method-enable
func (Security) SetIgnoreCertificateErrors ¶
SetIgnoreCertificateErrors enable/disable whether all certificate errors should be ignored.
See: https://chromedevtools.github.io/devtools-protocol/tot/Security#method-setIgnoreCertificateErrors
parameters:
- `ignore`: If true, all certificate errors will be ignored.
type ServiceWorker ¶
type ServiceWorker struct {
// contains filtered or unexported fields
}
ServiceWorker executes a cdproto command under ServiceWorker domain.
func (ServiceWorker) DeliverPushMessage ¶
func (doServiceWorker ServiceWorker) DeliverPushMessage(origin string, registrationID serviceworker.RegistrationID, data string) (err error)
DeliverPushMessage [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-deliverPushMessage
parameters:
- `origin`
- `registrationID`
- `data`
func (ServiceWorker) Disable ¶
func (doServiceWorker ServiceWorker) Disable() (err error)
Disable [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-disable
func (ServiceWorker) DispatchPeriodicSyncEvent ¶
func (doServiceWorker ServiceWorker) DispatchPeriodicSyncEvent(origin string, registrationID serviceworker.RegistrationID, tag string) (err error)
DispatchPeriodicSyncEvent [no description].
parameters:
- `origin`
- `registrationID`
- `tag`
func (ServiceWorker) DispatchSyncEvent ¶
func (doServiceWorker ServiceWorker) DispatchSyncEvent(origin string, registrationID serviceworker.RegistrationID, tag string, lastChance bool) (err error)
DispatchSyncEvent [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-dispatchSyncEvent
parameters:
- `origin`
- `registrationID`
- `tag`
- `lastChance`
func (ServiceWorker) Enable ¶
func (doServiceWorker ServiceWorker) Enable() (err error)
Enable [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-enable
func (ServiceWorker) InspectWorker ¶
func (doServiceWorker ServiceWorker) InspectWorker(versionID string) (err error)
InspectWorker [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-inspectWorker
parameters:
- `versionID`
func (ServiceWorker) SetForceUpdateOnPageLoad ¶
func (doServiceWorker ServiceWorker) SetForceUpdateOnPageLoad(forceUpdateOnPageLoad bool) (err error)
SetForceUpdateOnPageLoad [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-setForceUpdateOnPageLoad
parameters:
- `forceUpdateOnPageLoad`
func (ServiceWorker) SkipWaiting ¶
func (doServiceWorker ServiceWorker) SkipWaiting(scopeURL string) (err error)
SkipWaiting [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-skipWaiting
parameters:
- `scopeURL`
func (ServiceWorker) StartWorker ¶
func (doServiceWorker ServiceWorker) StartWorker(scopeURL string) (err error)
StartWorker [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-startWorker
parameters:
- `scopeURL`
func (ServiceWorker) StopAllWorkers ¶
func (doServiceWorker ServiceWorker) StopAllWorkers() (err error)
StopAllWorkers [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-stopAllWorkers
func (ServiceWorker) StopWorker ¶
func (doServiceWorker ServiceWorker) StopWorker(versionID string) (err error)
StopWorker [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-stopWorker
parameters:
- `versionID`
func (ServiceWorker) Unregister ¶
func (doServiceWorker ServiceWorker) Unregister(scopeURL string) (err error)
Unregister [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-unregister
parameters:
- `scopeURL`
func (ServiceWorker) UpdateRegistration ¶
func (doServiceWorker ServiceWorker) UpdateRegistration(scopeURL string) (err error)
UpdateRegistration [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-updateRegistration
parameters:
- `scopeURL`
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage executes a cdproto command under Storage domain.
func (Storage) ClearCookies ¶
func (doStorage Storage) ClearCookies(browserContextID *cdp.BrowserContextID) (err error)
ClearCookies clears cookies.
See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-clearCookies
parameters:
- `browserContextID`: This can be nil. (Optional) Browser context to use when called on the browser endpoint.
func (Storage) ClearDataForOrigin ¶
ClearDataForOrigin clears storage for origin.
See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-clearDataForOrigin
parameters:
- `origin`: Security origin.
- `storageTypes`: Comma separated list of StorageType to clear.
func (Storage) GetCookies ¶
func (doStorage Storage) GetCookies(browserContextID *cdp.BrowserContextID) (retCookies []*network.Cookie, err error)
GetCookies returns all browser cookies.
See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-getCookies
parameters:
- `browserContextID`: This can be nil. (Optional) Browser context to use when called on the browser endpoint.
returns:
- `retCookies`: Array of cookie objects.
func (Storage) GetUsageAndQuota ¶
func (doStorage Storage) GetUsageAndQuota(origin string) (retUsage float64, retQuota float64, retUsageBreakdown []*storage.UsageForType, err error)
GetUsageAndQuota returns usage and quota in bytes.
See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-getUsageAndQuota
parameters:
- `origin`: Security origin.
returns:
- `retUsage`: Storage usage (bytes).
- `retQuota`: Storage quota (bytes).
- `retUsageBreakdown`: Storage usage per type (bytes).
func (Storage) SetCookies ¶
func (doStorage Storage) SetCookies(cookies []*network.CookieParam, browserContextID *cdp.BrowserContextID) (err error)
SetCookies sets given cookies.
See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-setCookies
parameters:
- `cookies`: Cookies to be set.
- `browserContextID`: This can be nil. (Optional) Browser context to use when called on the browser endpoint.
func (Storage) TrackCacheStorageForOrigin ¶
TrackCacheStorageForOrigin registers origin to be notified when an update occurs to its cache storage list.
See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-trackCacheStorageForOrigin
parameters:
- `origin`: Security origin.
func (Storage) TrackIndexedDBForOrigin ¶
TrackIndexedDBForOrigin registers origin to be notified when an update occurs to its IndexedDB.
See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-trackIndexedDBForOrigin
parameters:
- `origin`: Security origin.
func (Storage) UntrackCacheStorageForOrigin ¶
UntrackCacheStorageForOrigin unregisters origin from receiving notifications for cache storage.
See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-untrackCacheStorageForOrigin
parameters:
- `origin`: Security origin.
func (Storage) UntrackIndexedDBForOrigin ¶
UntrackIndexedDBForOrigin unregisters origin from receiving notifications for IndexedDB.
See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-untrackIndexedDBForOrigin
parameters:
- `origin`: Security origin.
type SystemInfo ¶
type SystemInfo struct {
// contains filtered or unexported fields
}
SystemInfo executes a cdproto command under SystemInfo domain.
func (SystemInfo) GetInfo ¶
func (doSystemInfo SystemInfo) GetInfo() (retGpu *systeminfo.GPUInfo, retModelName string, retModelVersion string, retCommandLine string, err error)
GetInfo returns information about the system.
See: https://chromedevtools.github.io/devtools-protocol/tot/SystemInfo#method-getInfo
returns:
- `retGpu`: Information about the GPUs on the system.
- `retModelName`: A platform-dependent description of the model of the machine. On Mac OS, this is, for example, 'MacBookPro'. Will be the empty string if not supported.
- `retModelVersion`: A platform-dependent description of the version of the machine. On Mac OS, this is, for example, '10.1'. Will be the empty string if not supported.
- `retCommandLine`: The command line string used to launch the browser. Will be the empty string if not supported.
func (SystemInfo) GetProcessInfo ¶
func (doSystemInfo SystemInfo) GetProcessInfo() (retProcessInfo []*systeminfo.ProcessInfo, err error)
GetProcessInfo returns information about all running processes.
See: https://chromedevtools.github.io/devtools-protocol/tot/SystemInfo#method-getProcessInfo
returns:
- `retProcessInfo`: An array of process info blocks.
type Target ¶
type Target struct {
// contains filtered or unexported fields
}
Target executes a cdproto command under Target domain.
func (Target) ActivateTarget ¶
ActivateTarget activates (focuses) the target.
See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-activateTarget
parameters:
- `targetID`
func (Target) AttachToBrowserTarget ¶
AttachToBrowserTarget attaches to the browser target, only uses flat sessionId mode.
See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-attachToBrowserTarget
returns:
- `retSessionID`: Id assigned to the session.
func (Target) AttachToTarget ¶
func (doTarget Target) AttachToTarget(targetID target.ID, flatten *bool) (retSessionID target.SessionID, err error)
AttachToTarget attaches to the target with given id.
See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-attachToTarget
parameters:
- `targetID`
- `flatten`: This can be nil. (Optional) Enables "flat" access to the session via specifying sessionId attribute in the commands. We plan to make this the default, deprecate non-flattened mode, and eventually retire it. See crbug.com/991325.
returns:
- `retSessionID`: Id assigned to the session.
func (Target) CloseTarget ¶
CloseTarget closes the target. If the target is a page that gets closed too.
See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-closeTarget
parameters:
- `targetID`
returns:
- `retSuccess`
func (Target) CreateBrowserContext ¶
func (doTarget Target) CreateBrowserContext() (retBrowserContextID cdp.BrowserContextID, err error)
CreateBrowserContext creates a new empty BrowserContext. Similar to an incognito profile but you can have more than one.
See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-createBrowserContext
returns:
- `retBrowserContextID`: The id of the context created.
func (Target) CreateTarget ¶
func (doTarget Target) CreateTarget(url string, width *int64, height *int64, browserContextID *cdp.BrowserContextID, enableBeginFrameControl *bool, newWindow *bool, background *bool) (retTargetID target.ID, err error)
CreateTarget creates a new page.
See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-createTarget
parameters:
- `url`: The initial URL the page will be navigated to.
- `width`: This can be nil. (Optional) Frame width in DIP (headless chrome only).
- `height`: This can be nil. (Optional) Frame height in DIP (headless chrome only).
- `browserContextID`: This can be nil. (Optional) The browser context to create the page in.
- `enableBeginFrameControl`: This can be nil. (Optional) Whether BeginFrames for this target will be controlled via DevTools (headless chrome only, not supported on MacOS yet, false by default).
- `newWindow`: This can be nil. (Optional) Whether to create a new Window or Tab (chrome-only, false by default).
- `background`: This can be nil. (Optional) Whether to create the target in background or foreground (chrome-only, false by default).
returns:
- `retTargetID`: The id of the page opened.
func (Target) DetachFromTarget ¶
DetachFromTarget detaches session with given id.
See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-detachFromTarget
parameters:
- `sessionID`: This can be nil. (Optional) Session to detach.
func (Target) DisposeBrowserContext ¶
func (doTarget Target) DisposeBrowserContext(browserContextID cdp.BrowserContextID) (err error)
DisposeBrowserContext deletes a BrowserContext. All the belonging pages will be closed without calling their beforeunload hooks.
See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-disposeBrowserContext
parameters:
- `browserContextID`
func (Target) ExposeDevToolsProtocol ¶
ExposeDevToolsProtocol inject object to the target's main frame that provides a communication channel with browser target. Injected object will be available as window[bindingName]. The object has the follwing API: - binding.send(json) - a method to send messages over the remote debugging protocol - binding.onmessage = json => handleMessage(json) - a callback that will be called for the protocol notifications and command responses.
See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-exposeDevToolsProtocol
parameters:
- `targetID`
- `bindingName`: This can be nil. (Optional) Binding name, 'cdp' if not specified.
func (Target) GetBrowserContexts ¶
func (doTarget Target) GetBrowserContexts() (retBrowserContextIds []cdp.BrowserContextID, err error)
GetBrowserContexts returns all browser contexts created with Target.createBrowserContext method.
See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-getBrowserContexts
returns:
- `retBrowserContextIds`: An array of browser context ids.
func (Target) GetTargetInfo ¶
GetTargetInfo returns information about a target.
See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-getTargetInfo
parameters:
- `targetID`
returns:
- `retTargetInfo`
func (Target) GetTargets ¶
GetTargets retrieves a list of available targets.
See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-getTargets
returns:
- `retTargetInfos`: The list of targets.
func (Target) SetAutoAttach ¶
func (doTarget Target) SetAutoAttach(autoAttach bool, waitForDebuggerOnStart bool, flatten *bool, windowOpen *bool) (err error)
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.
See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-setAutoAttach
parameters:
- `autoAttach`: Whether to auto-attach to related targets.
- `waitForDebuggerOnStart`: Whether to pause new targets when attaching to them. Use Runtime.runIfWaitingForDebugger to run paused targets.
- `flatten`: This can be nil. (Optional) Enables "flat" access to the session via specifying sessionId attribute in the commands. We plan to make this the default, deprecate non-flattened mode, and eventually retire it. See crbug.com/991325.
- `windowOpen`: This can be nil. (Optional) Auto-attach to the targets created via window.open from current target.
func (Target) SetDiscoverTargets ¶
SetDiscoverTargets controls whether to discover available targets and notify via targetCreated/targetInfoChanged/targetDestroyed events.
See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-setDiscoverTargets
parameters:
- `discover`: Whether to discover available targets.
func (Target) SetRemoteLocations ¶
func (doTarget Target) SetRemoteLocations(locations []*target.RemoteLocation) (err error)
SetRemoteLocations enables target discovery for the specified locations, when setDiscoverTargets was set to true.
See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-setRemoteLocations
parameters:
- `locations`: List of remote locations.
type Tethering ¶
type Tethering struct {
// contains filtered or unexported fields
}
Tethering executes a cdproto command under Tethering domain.
func (Tethering) Bind ¶
Bind request browser port binding.
See: https://chromedevtools.github.io/devtools-protocol/tot/Tethering#method-bind
parameters:
- `port`: Port number to bind.
type Tracing ¶
type Tracing struct {
// contains filtered or unexported fields
}
Tracing executes a cdproto command under Tracing domain.
func (Tracing) End ¶
End stop trace events collection.
See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#method-end
func (Tracing) GetCategories ¶
GetCategories gets supported tracing categories.
See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#method-getCategories
returns:
- `retCategories`: A list of supported tracing categories.
func (Tracing) RecordClockSyncMarker ¶
RecordClockSyncMarker record a clock sync marker in the trace.
See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#method-recordClockSyncMarker
parameters:
- `syncID`: The ID of this clock sync marker
func (Tracing) RequestMemoryDump ¶
func (doTracing Tracing) RequestMemoryDump(deterministic *bool) (retDumpGUID string, retSuccess bool, err error)
RequestMemoryDump request a global memory dump.
See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#method-requestMemoryDump
parameters:
- `deterministic`: This can be nil. (Optional) Enables more deterministic results by forcing garbage collection
returns:
- `retDumpGUID`: GUID of the resulting global memory dump.
- `retSuccess`: True iff the global memory dump succeeded.
func (Tracing) Start ¶
func (doTracing Tracing) Start(bufferUsageReportingInterval *float64, transferMode *tracing.TransferMode, streamFormat *tracing.StreamFormat, streamCompression *tracing.StreamCompression, traceConfig *tracing.TraceConfig) (err error)
Start start trace events collection.
See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#method-start
parameters:
- `bufferUsageReportingInterval`: This can be nil. (Optional) If set, the agent will issue bufferUsage events at this interval, specified in milliseconds
- `transferMode`: This can be nil. (Optional) Whether to report trace events as series of dataCollected events or to save trace to a stream (defaults to ReportEvents).
- `streamFormat`: This can be nil. (Optional) Trace data format to use. This only applies when using ReturnAsStream transfer mode (defaults to json).
- `streamCompression`: This can be nil. (Optional) Compression format to use. This only applies when using ReturnAsStream transfer mode (defaults to none)
- `traceConfig`
type WebAudio ¶
type WebAudio struct {
// contains filtered or unexported fields
}
WebAudio executes a cdproto command under WebAudio domain.
func (WebAudio) Disable ¶
Disable disables the WebAudio domain.
See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#method-disable
func (WebAudio) Enable ¶
Enable enables the WebAudio domain and starts sending context lifetime events.
See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#method-enable
func (WebAudio) GetRealtimeData ¶
func (doWebAudio WebAudio) GetRealtimeData(contextID webaudio.GraphObjectID) (retRealtimeData *webaudio.ContextRealtimeData, err error)
GetRealtimeData fetch the realtime data from the registered contexts.
See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#method-getRealtimeData
parameters:
- `contextID`
returns:
- `retRealtimeData`
type WebAuthn ¶
type WebAuthn struct {
// contains filtered or unexported fields
}
WebAuthn executes a cdproto command under WebAuthn domain.
func (WebAuthn) AddCredential ¶
func (doWebAuthn WebAuthn) AddCredential(authenticatorID webauthn.AuthenticatorID, credential *webauthn.Credential) (err error)
AddCredential adds the credential to the specified authenticator.
See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-addCredential
parameters:
- `authenticatorID`
- `credential`
func (WebAuthn) AddVirtualAuthenticator ¶
func (doWebAuthn WebAuthn) AddVirtualAuthenticator(options *webauthn.VirtualAuthenticatorOptions) (retAuthenticatorID webauthn.AuthenticatorID, err error)
AddVirtualAuthenticator creates and adds a virtual authenticator.
See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-addVirtualAuthenticator
parameters:
- `options`
returns:
- `retAuthenticatorID`
func (WebAuthn) ClearCredentials ¶
func (doWebAuthn WebAuthn) ClearCredentials(authenticatorID webauthn.AuthenticatorID) (err error)
ClearCredentials clears all the credentials from the specified device.
See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-clearCredentials
parameters:
- `authenticatorID`
func (WebAuthn) Disable ¶
Disable disable the WebAuthn domain.
See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-disable
func (WebAuthn) Enable ¶
Enable enable the WebAuthn domain and start intercepting credential storage and retrieval with a virtual authenticator.
See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-enable
func (WebAuthn) GetCredential ¶
func (doWebAuthn WebAuthn) GetCredential(authenticatorID webauthn.AuthenticatorID, credentialID string) (retCredential *webauthn.Credential, err error)
GetCredential returns a single credential stored in the given virtual authenticator that matches the credential ID.
See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-getCredential
parameters:
- `authenticatorID`
- `credentialID`
returns:
- `retCredential`
func (WebAuthn) GetCredentials ¶
func (doWebAuthn WebAuthn) GetCredentials(authenticatorID webauthn.AuthenticatorID) (retCredentials []*webauthn.Credential, err error)
GetCredentials returns all the credentials stored in the given virtual authenticator.
See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-getCredentials
parameters:
- `authenticatorID`
returns:
- `retCredentials`
func (WebAuthn) RemoveCredential ¶
func (doWebAuthn WebAuthn) RemoveCredential(authenticatorID webauthn.AuthenticatorID, credentialID string) (err error)
RemoveCredential removes a credential from the authenticator.
See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-removeCredential
parameters:
- `authenticatorID`
- `credentialID`
func (WebAuthn) RemoveVirtualAuthenticator ¶
func (doWebAuthn WebAuthn) RemoveVirtualAuthenticator(authenticatorID webauthn.AuthenticatorID) (err error)
RemoveVirtualAuthenticator removes the given authenticator.
See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-removeVirtualAuthenticator
parameters:
- `authenticatorID`
func (WebAuthn) SetUserVerified ¶
func (doWebAuthn WebAuthn) SetUserVerified(authenticatorID webauthn.AuthenticatorID, isUserVerified bool) (err error)
SetUserVerified sets whether User Verification succeeds or fails for an authenticator. The default is true.
See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-setUserVerified
parameters:
- `authenticatorID`
- `isUserVerified`
Source Files ¶
- accessibility.go
- animation.go
- applicationcache.go
- audits.go
- backgroundservice.go
- browser.go
- cachestorage.go
- cast.go
- css.go
- database.go
- debugger.go
- deviceorientation.go
- dom.go
- domain.go
- domdebugger.go
- domsnapshot.go
- domstorage.go
- emulation.go
- fetch.go
- har.go
- headlessexperimental.go
- heapprofiler.go
- indexeddb.go
- input.go
- inspector.go
- io.go
- layertree.go
- log.go
- media.go
- memory.go
- network.go
- overlay.go
- page.go
- performance.go
- profiler.go
- runtime.go
- security.go
- serviceworker.go
- storage.go
- systeminfo.go
- target.go
- tethering.go
- tracing.go
- webaudio.go
- webauthn.go