1887 lines
87 KiB
Go
1887 lines
87 KiB
Go
|
package cdp
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"errors"
|
||
|
"fmt"
|
||
|
"strconv"
|
||
|
"strings"
|
||
|
"sync"
|
||
|
"time"
|
||
|
|
||
|
"github.com/knq/sysutil"
|
||
|
"github.com/mailru/easyjson"
|
||
|
"github.com/mailru/easyjson/jlexer"
|
||
|
"github.com/mailru/easyjson/jwriter"
|
||
|
)
|
||
|
|
||
|
// AUTOGENERATED. DO NOT EDIT.
|
||
|
|
||
|
// MessageError message error type.
|
||
|
type MessageError struct {
|
||
|
Code int64 `json:"code,omitempty"` // Error code.
|
||
|
Message string `json:"message,omitempty"` // Error message.
|
||
|
}
|
||
|
|
||
|
// Error satisfies error interface.
|
||
|
func (e *MessageError) Error() string {
|
||
|
return fmt.Sprintf("%s (%d)", e.Message, e.Code)
|
||
|
}
|
||
|
|
||
|
// Message chrome Debugging Protocol message sent to/read over websocket
|
||
|
// connection.
|
||
|
type Message struct {
|
||
|
ID int64 `json:"id,omitempty"` // Unique message identifier.
|
||
|
Method MethodType `json:"method,omitempty"` // Event or command type.
|
||
|
Params easyjson.RawMessage `json:"params,omitempty"` // Event or command parameters.
|
||
|
Result easyjson.RawMessage `json:"result,omitempty"` // Command return values.
|
||
|
Error *MessageError `json:"error,omitempty"` // Error message.
|
||
|
}
|
||
|
|
||
|
// MethodType chrome Debugging Protocol method type (ie, event and command
|
||
|
// names).
|
||
|
type MethodType string
|
||
|
|
||
|
// String returns the MethodType as string value.
|
||
|
func (t MethodType) String() string {
|
||
|
return string(t)
|
||
|
}
|
||
|
|
||
|
// MethodType values.
|
||
|
const (
|
||
|
EventInspectorDetached MethodType = "Inspector.detached"
|
||
|
EventInspectorTargetCrashed MethodType = "Inspector.targetCrashed"
|
||
|
CommandInspectorEnable MethodType = "Inspector.enable"
|
||
|
CommandInspectorDisable MethodType = "Inspector.disable"
|
||
|
CommandMemoryGetDOMCounters MethodType = "Memory.getDOMCounters"
|
||
|
CommandMemorySetPressureNotificationsSuppressed MethodType = "Memory.setPressureNotificationsSuppressed"
|
||
|
CommandMemorySimulatePressureNotification MethodType = "Memory.simulatePressureNotification"
|
||
|
EventPageDomContentEventFired MethodType = "Page.domContentEventFired"
|
||
|
EventPageLoadEventFired MethodType = "Page.loadEventFired"
|
||
|
EventPageFrameAttached MethodType = "Page.frameAttached"
|
||
|
EventPageFrameNavigated MethodType = "Page.frameNavigated"
|
||
|
EventPageFrameDetached MethodType = "Page.frameDetached"
|
||
|
EventPageFrameStartedLoading MethodType = "Page.frameStartedLoading"
|
||
|
EventPageFrameStoppedLoading MethodType = "Page.frameStoppedLoading"
|
||
|
EventPageFrameScheduledNavigation MethodType = "Page.frameScheduledNavigation"
|
||
|
EventPageFrameClearedScheduledNavigation MethodType = "Page.frameClearedScheduledNavigation"
|
||
|
EventPageFrameResized MethodType = "Page.frameResized"
|
||
|
EventPageJavascriptDialogOpening MethodType = "Page.javascriptDialogOpening"
|
||
|
EventPageJavascriptDialogClosed MethodType = "Page.javascriptDialogClosed"
|
||
|
EventPageScreencastFrame MethodType = "Page.screencastFrame"
|
||
|
EventPageScreencastVisibilityChanged MethodType = "Page.screencastVisibilityChanged"
|
||
|
EventPageColorPicked MethodType = "Page.colorPicked"
|
||
|
EventPageInterstitialShown MethodType = "Page.interstitialShown"
|
||
|
EventPageInterstitialHidden MethodType = "Page.interstitialHidden"
|
||
|
EventPageNavigationRequested MethodType = "Page.navigationRequested"
|
||
|
CommandPageEnable MethodType = "Page.enable"
|
||
|
CommandPageDisable MethodType = "Page.disable"
|
||
|
CommandPageAddScriptToEvaluateOnLoad MethodType = "Page.addScriptToEvaluateOnLoad"
|
||
|
CommandPageRemoveScriptToEvaluateOnLoad MethodType = "Page.removeScriptToEvaluateOnLoad"
|
||
|
CommandPageSetAutoAttachToCreatedPages MethodType = "Page.setAutoAttachToCreatedPages"
|
||
|
CommandPageReload MethodType = "Page.reload"
|
||
|
CommandPageNavigate MethodType = "Page.navigate"
|
||
|
CommandPageStopLoading MethodType = "Page.stopLoading"
|
||
|
CommandPageGetNavigationHistory MethodType = "Page.getNavigationHistory"
|
||
|
CommandPageNavigateToHistoryEntry MethodType = "Page.navigateToHistoryEntry"
|
||
|
CommandPageGetResourceTree MethodType = "Page.getResourceTree"
|
||
|
CommandPageGetResourceContent MethodType = "Page.getResourceContent"
|
||
|
CommandPageSearchInResource MethodType = "Page.searchInResource"
|
||
|
CommandPageSetDocumentContent MethodType = "Page.setDocumentContent"
|
||
|
CommandPageCaptureScreenshot MethodType = "Page.captureScreenshot"
|
||
|
CommandPageStartScreencast MethodType = "Page.startScreencast"
|
||
|
CommandPageStopScreencast MethodType = "Page.stopScreencast"
|
||
|
CommandPageScreencastFrameAck MethodType = "Page.screencastFrameAck"
|
||
|
CommandPageHandleJavaScriptDialog MethodType = "Page.handleJavaScriptDialog"
|
||
|
CommandPageSetColorPickerEnabled MethodType = "Page.setColorPickerEnabled"
|
||
|
CommandPageConfigureOverlay MethodType = "Page.configureOverlay"
|
||
|
CommandPageGetAppManifest MethodType = "Page.getAppManifest"
|
||
|
CommandPageRequestAppBanner MethodType = "Page.requestAppBanner"
|
||
|
CommandPageSetControlNavigations MethodType = "Page.setControlNavigations"
|
||
|
CommandPageProcessNavigation MethodType = "Page.processNavigation"
|
||
|
CommandPageGetLayoutMetrics MethodType = "Page.getLayoutMetrics"
|
||
|
CommandRenderingSetShowPaintRects MethodType = "Rendering.setShowPaintRects"
|
||
|
CommandRenderingSetShowDebugBorders MethodType = "Rendering.setShowDebugBorders"
|
||
|
CommandRenderingSetShowFPSCounter MethodType = "Rendering.setShowFPSCounter"
|
||
|
CommandRenderingSetShowScrollBottleneckRects MethodType = "Rendering.setShowScrollBottleneckRects"
|
||
|
CommandRenderingSetShowViewportSizeOnResize MethodType = "Rendering.setShowViewportSizeOnResize"
|
||
|
EventEmulationVirtualTimeBudgetExpired MethodType = "Emulation.virtualTimeBudgetExpired"
|
||
|
CommandEmulationSetDeviceMetricsOverride MethodType = "Emulation.setDeviceMetricsOverride"
|
||
|
CommandEmulationClearDeviceMetricsOverride MethodType = "Emulation.clearDeviceMetricsOverride"
|
||
|
CommandEmulationForceViewport MethodType = "Emulation.forceViewport"
|
||
|
CommandEmulationResetViewport MethodType = "Emulation.resetViewport"
|
||
|
CommandEmulationResetPageScaleFactor MethodType = "Emulation.resetPageScaleFactor"
|
||
|
CommandEmulationSetPageScaleFactor MethodType = "Emulation.setPageScaleFactor"
|
||
|
CommandEmulationSetVisibleSize MethodType = "Emulation.setVisibleSize"
|
||
|
CommandEmulationSetScriptExecutionDisabled MethodType = "Emulation.setScriptExecutionDisabled"
|
||
|
CommandEmulationSetGeolocationOverride MethodType = "Emulation.setGeolocationOverride"
|
||
|
CommandEmulationClearGeolocationOverride MethodType = "Emulation.clearGeolocationOverride"
|
||
|
CommandEmulationSetTouchEmulationEnabled MethodType = "Emulation.setTouchEmulationEnabled"
|
||
|
CommandEmulationSetEmulatedMedia MethodType = "Emulation.setEmulatedMedia"
|
||
|
CommandEmulationSetCPUThrottlingRate MethodType = "Emulation.setCPUThrottlingRate"
|
||
|
CommandEmulationCanEmulate MethodType = "Emulation.canEmulate"
|
||
|
CommandEmulationSetVirtualTimePolicy MethodType = "Emulation.setVirtualTimePolicy"
|
||
|
EventSecuritySecurityStateChanged MethodType = "Security.securityStateChanged"
|
||
|
CommandSecurityEnable MethodType = "Security.enable"
|
||
|
CommandSecurityDisable MethodType = "Security.disable"
|
||
|
CommandSecurityShowCertificateViewer MethodType = "Security.showCertificateViewer"
|
||
|
EventNetworkResourceChangedPriority MethodType = "Network.resourceChangedPriority"
|
||
|
EventNetworkRequestWillBeSent MethodType = "Network.requestWillBeSent"
|
||
|
EventNetworkRequestServedFromCache MethodType = "Network.requestServedFromCache"
|
||
|
EventNetworkResponseReceived MethodType = "Network.responseReceived"
|
||
|
EventNetworkDataReceived MethodType = "Network.dataReceived"
|
||
|
EventNetworkLoadingFinished MethodType = "Network.loadingFinished"
|
||
|
EventNetworkLoadingFailed MethodType = "Network.loadingFailed"
|
||
|
EventNetworkWebSocketWillSendHandshakeRequest MethodType = "Network.webSocketWillSendHandshakeRequest"
|
||
|
EventNetworkWebSocketHandshakeResponseReceived MethodType = "Network.webSocketHandshakeResponseReceived"
|
||
|
EventNetworkWebSocketCreated MethodType = "Network.webSocketCreated"
|
||
|
EventNetworkWebSocketClosed MethodType = "Network.webSocketClosed"
|
||
|
EventNetworkWebSocketFrameReceived MethodType = "Network.webSocketFrameReceived"
|
||
|
EventNetworkWebSocketFrameError MethodType = "Network.webSocketFrameError"
|
||
|
EventNetworkWebSocketFrameSent MethodType = "Network.webSocketFrameSent"
|
||
|
EventNetworkEventSourceMessageReceived MethodType = "Network.eventSourceMessageReceived"
|
||
|
CommandNetworkEnable MethodType = "Network.enable"
|
||
|
CommandNetworkDisable MethodType = "Network.disable"
|
||
|
CommandNetworkSetUserAgentOverride MethodType = "Network.setUserAgentOverride"
|
||
|
CommandNetworkSetExtraHTTPHeaders MethodType = "Network.setExtraHTTPHeaders"
|
||
|
CommandNetworkGetResponseBody MethodType = "Network.getResponseBody"
|
||
|
CommandNetworkAddBlockedURL MethodType = "Network.addBlockedURL"
|
||
|
CommandNetworkRemoveBlockedURL MethodType = "Network.removeBlockedURL"
|
||
|
CommandNetworkReplayXHR MethodType = "Network.replayXHR"
|
||
|
CommandNetworkSetMonitoringXHREnabled MethodType = "Network.setMonitoringXHREnabled"
|
||
|
CommandNetworkCanClearBrowserCache MethodType = "Network.canClearBrowserCache"
|
||
|
CommandNetworkClearBrowserCache MethodType = "Network.clearBrowserCache"
|
||
|
CommandNetworkCanClearBrowserCookies MethodType = "Network.canClearBrowserCookies"
|
||
|
CommandNetworkClearBrowserCookies MethodType = "Network.clearBrowserCookies"
|
||
|
CommandNetworkGetCookies MethodType = "Network.getCookies"
|
||
|
CommandNetworkGetAllCookies MethodType = "Network.getAllCookies"
|
||
|
CommandNetworkDeleteCookie MethodType = "Network.deleteCookie"
|
||
|
CommandNetworkSetCookie MethodType = "Network.setCookie"
|
||
|
CommandNetworkCanEmulateNetworkConditions MethodType = "Network.canEmulateNetworkConditions"
|
||
|
CommandNetworkEmulateNetworkConditions MethodType = "Network.emulateNetworkConditions"
|
||
|
CommandNetworkSetCacheDisabled MethodType = "Network.setCacheDisabled"
|
||
|
CommandNetworkSetBypassServiceWorker MethodType = "Network.setBypassServiceWorker"
|
||
|
CommandNetworkSetDataSizeLimitsForTest MethodType = "Network.setDataSizeLimitsForTest"
|
||
|
CommandNetworkGetCertificate MethodType = "Network.getCertificate"
|
||
|
EventDatabaseAddDatabase MethodType = "Database.addDatabase"
|
||
|
CommandDatabaseEnable MethodType = "Database.enable"
|
||
|
CommandDatabaseDisable MethodType = "Database.disable"
|
||
|
CommandDatabaseGetDatabaseTableNames MethodType = "Database.getDatabaseTableNames"
|
||
|
CommandDatabaseExecuteSQL MethodType = "Database.executeSQL"
|
||
|
CommandIndexedDBEnable MethodType = "IndexedDB.enable"
|
||
|
CommandIndexedDBDisable MethodType = "IndexedDB.disable"
|
||
|
CommandIndexedDBRequestDatabaseNames MethodType = "IndexedDB.requestDatabaseNames"
|
||
|
CommandIndexedDBRequestDatabase MethodType = "IndexedDB.requestDatabase"
|
||
|
CommandIndexedDBRequestData MethodType = "IndexedDB.requestData"
|
||
|
CommandIndexedDBClearObjectStore MethodType = "IndexedDB.clearObjectStore"
|
||
|
CommandCacheStorageRequestCacheNames MethodType = "CacheStorage.requestCacheNames"
|
||
|
CommandCacheStorageRequestEntries MethodType = "CacheStorage.requestEntries"
|
||
|
CommandCacheStorageDeleteCache MethodType = "CacheStorage.deleteCache"
|
||
|
CommandCacheStorageDeleteEntry MethodType = "CacheStorage.deleteEntry"
|
||
|
EventDOMStorageDomStorageItemsCleared MethodType = "DOMStorage.domStorageItemsCleared"
|
||
|
EventDOMStorageDomStorageItemRemoved MethodType = "DOMStorage.domStorageItemRemoved"
|
||
|
EventDOMStorageDomStorageItemAdded MethodType = "DOMStorage.domStorageItemAdded"
|
||
|
EventDOMStorageDomStorageItemUpdated MethodType = "DOMStorage.domStorageItemUpdated"
|
||
|
CommandDOMStorageEnable MethodType = "DOMStorage.enable"
|
||
|
CommandDOMStorageDisable MethodType = "DOMStorage.disable"
|
||
|
CommandDOMStorageClear MethodType = "DOMStorage.clear"
|
||
|
CommandDOMStorageGetDOMStorageItems MethodType = "DOMStorage.getDOMStorageItems"
|
||
|
CommandDOMStorageSetDOMStorageItem MethodType = "DOMStorage.setDOMStorageItem"
|
||
|
CommandDOMStorageRemoveDOMStorageItem MethodType = "DOMStorage.removeDOMStorageItem"
|
||
|
EventApplicationCacheApplicationCacheStatusUpdated MethodType = "ApplicationCache.applicationCacheStatusUpdated"
|
||
|
EventApplicationCacheNetworkStateUpdated MethodType = "ApplicationCache.networkStateUpdated"
|
||
|
CommandApplicationCacheGetFramesWithManifests MethodType = "ApplicationCache.getFramesWithManifests"
|
||
|
CommandApplicationCacheEnable MethodType = "ApplicationCache.enable"
|
||
|
CommandApplicationCacheGetManifestForFrame MethodType = "ApplicationCache.getManifestForFrame"
|
||
|
CommandApplicationCacheGetApplicationCacheForFrame MethodType = "ApplicationCache.getApplicationCacheForFrame"
|
||
|
EventDOMDocumentUpdated MethodType = "DOM.documentUpdated"
|
||
|
EventDOMInspectNodeRequested MethodType = "DOM.inspectNodeRequested"
|
||
|
EventDOMSetChildNodes MethodType = "DOM.setChildNodes"
|
||
|
EventDOMAttributeModified MethodType = "DOM.attributeModified"
|
||
|
EventDOMAttributeRemoved MethodType = "DOM.attributeRemoved"
|
||
|
EventDOMInlineStyleInvalidated MethodType = "DOM.inlineStyleInvalidated"
|
||
|
EventDOMCharacterDataModified MethodType = "DOM.characterDataModified"
|
||
|
EventDOMChildNodeCountUpdated MethodType = "DOM.childNodeCountUpdated"
|
||
|
EventDOMChildNodeInserted MethodType = "DOM.childNodeInserted"
|
||
|
EventDOMChildNodeRemoved MethodType = "DOM.childNodeRemoved"
|
||
|
EventDOMShadowRootPushed MethodType = "DOM.shadowRootPushed"
|
||
|
EventDOMShadowRootPopped MethodType = "DOM.shadowRootPopped"
|
||
|
EventDOMPseudoElementAdded MethodType = "DOM.pseudoElementAdded"
|
||
|
EventDOMPseudoElementRemoved MethodType = "DOM.pseudoElementRemoved"
|
||
|
EventDOMDistributedNodesUpdated MethodType = "DOM.distributedNodesUpdated"
|
||
|
EventDOMNodeHighlightRequested MethodType = "DOM.nodeHighlightRequested"
|
||
|
CommandDOMEnable MethodType = "DOM.enable"
|
||
|
CommandDOMDisable MethodType = "DOM.disable"
|
||
|
CommandDOMGetDocument MethodType = "DOM.getDocument"
|
||
|
CommandDOMCollectClassNamesFromSubtree MethodType = "DOM.collectClassNamesFromSubtree"
|
||
|
CommandDOMRequestChildNodes MethodType = "DOM.requestChildNodes"
|
||
|
CommandDOMQuerySelector MethodType = "DOM.querySelector"
|
||
|
CommandDOMQuerySelectorAll MethodType = "DOM.querySelectorAll"
|
||
|
CommandDOMSetNodeName MethodType = "DOM.setNodeName"
|
||
|
CommandDOMSetNodeValue MethodType = "DOM.setNodeValue"
|
||
|
CommandDOMRemoveNode MethodType = "DOM.removeNode"
|
||
|
CommandDOMSetAttributeValue MethodType = "DOM.setAttributeValue"
|
||
|
CommandDOMSetAttributesAsText MethodType = "DOM.setAttributesAsText"
|
||
|
CommandDOMRemoveAttribute MethodType = "DOM.removeAttribute"
|
||
|
CommandDOMGetOuterHTML MethodType = "DOM.getOuterHTML"
|
||
|
CommandDOMSetOuterHTML MethodType = "DOM.setOuterHTML"
|
||
|
CommandDOMPerformSearch MethodType = "DOM.performSearch"
|
||
|
CommandDOMGetSearchResults MethodType = "DOM.getSearchResults"
|
||
|
CommandDOMDiscardSearchResults MethodType = "DOM.discardSearchResults"
|
||
|
CommandDOMRequestNode MethodType = "DOM.requestNode"
|
||
|
CommandDOMSetInspectMode MethodType = "DOM.setInspectMode"
|
||
|
CommandDOMHighlightRect MethodType = "DOM.highlightRect"
|
||
|
CommandDOMHighlightQuad MethodType = "DOM.highlightQuad"
|
||
|
CommandDOMHighlightNode MethodType = "DOM.highlightNode"
|
||
|
CommandDOMHideHighlight MethodType = "DOM.hideHighlight"
|
||
|
CommandDOMHighlightFrame MethodType = "DOM.highlightFrame"
|
||
|
CommandDOMPushNodeByPathToFrontend MethodType = "DOM.pushNodeByPathToFrontend"
|
||
|
CommandDOMPushNodesByBackendIdsToFrontend MethodType = "DOM.pushNodesByBackendIdsToFrontend"
|
||
|
CommandDOMSetInspectedNode MethodType = "DOM.setInspectedNode"
|
||
|
CommandDOMResolveNode MethodType = "DOM.resolveNode"
|
||
|
CommandDOMGetAttributes MethodType = "DOM.getAttributes"
|
||
|
CommandDOMCopyTo MethodType = "DOM.copyTo"
|
||
|
CommandDOMMoveTo MethodType = "DOM.moveTo"
|
||
|
CommandDOMUndo MethodType = "DOM.undo"
|
||
|
CommandDOMRedo MethodType = "DOM.redo"
|
||
|
CommandDOMMarkUndoableState MethodType = "DOM.markUndoableState"
|
||
|
CommandDOMFocus MethodType = "DOM.focus"
|
||
|
CommandDOMSetFileInputFiles MethodType = "DOM.setFileInputFiles"
|
||
|
CommandDOMGetBoxModel MethodType = "DOM.getBoxModel"
|
||
|
CommandDOMGetNodeForLocation MethodType = "DOM.getNodeForLocation"
|
||
|
CommandDOMGetRelayoutBoundary MethodType = "DOM.getRelayoutBoundary"
|
||
|
CommandDOMGetHighlightObjectForTest MethodType = "DOM.getHighlightObjectForTest"
|
||
|
EventCSSMediaQueryResultChanged MethodType = "CSS.mediaQueryResultChanged"
|
||
|
EventCSSFontsUpdated MethodType = "CSS.fontsUpdated"
|
||
|
EventCSSStyleSheetChanged MethodType = "CSS.styleSheetChanged"
|
||
|
EventCSSStyleSheetAdded MethodType = "CSS.styleSheetAdded"
|
||
|
EventCSSStyleSheetRemoved MethodType = "CSS.styleSheetRemoved"
|
||
|
CommandCSSEnable MethodType = "CSS.enable"
|
||
|
CommandCSSDisable MethodType = "CSS.disable"
|
||
|
CommandCSSGetMatchedStylesForNode MethodType = "CSS.getMatchedStylesForNode"
|
||
|
CommandCSSGetInlineStylesForNode MethodType = "CSS.getInlineStylesForNode"
|
||
|
CommandCSSGetComputedStyleForNode MethodType = "CSS.getComputedStyleForNode"
|
||
|
CommandCSSGetPlatformFontsForNode MethodType = "CSS.getPlatformFontsForNode"
|
||
|
CommandCSSGetStyleSheetText MethodType = "CSS.getStyleSheetText"
|
||
|
CommandCSSCollectClassNames MethodType = "CSS.collectClassNames"
|
||
|
CommandCSSSetStyleSheetText MethodType = "CSS.setStyleSheetText"
|
||
|
CommandCSSSetRuleSelector MethodType = "CSS.setRuleSelector"
|
||
|
CommandCSSSetKeyframeKey MethodType = "CSS.setKeyframeKey"
|
||
|
CommandCSSSetStyleTexts MethodType = "CSS.setStyleTexts"
|
||
|
CommandCSSSetMediaText MethodType = "CSS.setMediaText"
|
||
|
CommandCSSCreateStyleSheet MethodType = "CSS.createStyleSheet"
|
||
|
CommandCSSAddRule MethodType = "CSS.addRule"
|
||
|
CommandCSSForcePseudoState MethodType = "CSS.forcePseudoState"
|
||
|
CommandCSSGetMediaQueries MethodType = "CSS.getMediaQueries"
|
||
|
CommandCSSSetEffectivePropertyValueForNode MethodType = "CSS.setEffectivePropertyValueForNode"
|
||
|
CommandCSSGetBackgroundColors MethodType = "CSS.getBackgroundColors"
|
||
|
CommandCSSGetLayoutTreeAndStyles MethodType = "CSS.getLayoutTreeAndStyles"
|
||
|
CommandCSSStartRuleUsageTracking MethodType = "CSS.startRuleUsageTracking"
|
||
|
CommandCSSStopRuleUsageTracking MethodType = "CSS.stopRuleUsageTracking"
|
||
|
CommandIORead MethodType = "IO.read"
|
||
|
CommandIOClose MethodType = "IO.close"
|
||
|
CommandDOMDebuggerSetDOMBreakpoint MethodType = "DOMDebugger.setDOMBreakpoint"
|
||
|
CommandDOMDebuggerRemoveDOMBreakpoint MethodType = "DOMDebugger.removeDOMBreakpoint"
|
||
|
CommandDOMDebuggerSetEventListenerBreakpoint MethodType = "DOMDebugger.setEventListenerBreakpoint"
|
||
|
CommandDOMDebuggerRemoveEventListenerBreakpoint MethodType = "DOMDebugger.removeEventListenerBreakpoint"
|
||
|
CommandDOMDebuggerSetInstrumentationBreakpoint MethodType = "DOMDebugger.setInstrumentationBreakpoint"
|
||
|
CommandDOMDebuggerRemoveInstrumentationBreakpoint MethodType = "DOMDebugger.removeInstrumentationBreakpoint"
|
||
|
CommandDOMDebuggerSetXHRBreakpoint MethodType = "DOMDebugger.setXHRBreakpoint"
|
||
|
CommandDOMDebuggerRemoveXHRBreakpoint MethodType = "DOMDebugger.removeXHRBreakpoint"
|
||
|
CommandDOMDebuggerGetEventListeners MethodType = "DOMDebugger.getEventListeners"
|
||
|
EventTargetTargetCreated MethodType = "Target.targetCreated"
|
||
|
EventTargetTargetDestroyed MethodType = "Target.targetDestroyed"
|
||
|
EventTargetAttachedToTarget MethodType = "Target.attachedToTarget"
|
||
|
EventTargetDetachedFromTarget MethodType = "Target.detachedFromTarget"
|
||
|
EventTargetReceivedMessageFromTarget MethodType = "Target.receivedMessageFromTarget"
|
||
|
CommandTargetSetDiscoverTargets MethodType = "Target.setDiscoverTargets"
|
||
|
CommandTargetSetAutoAttach MethodType = "Target.setAutoAttach"
|
||
|
CommandTargetSetAttachToFrames MethodType = "Target.setAttachToFrames"
|
||
|
CommandTargetSetRemoteLocations MethodType = "Target.setRemoteLocations"
|
||
|
CommandTargetSendMessageToTarget MethodType = "Target.sendMessageToTarget"
|
||
|
CommandTargetGetTargetInfo MethodType = "Target.getTargetInfo"
|
||
|
CommandTargetActivateTarget MethodType = "Target.activateTarget"
|
||
|
CommandTargetCloseTarget MethodType = "Target.closeTarget"
|
||
|
CommandTargetAttachToTarget MethodType = "Target.attachToTarget"
|
||
|
CommandTargetDetachFromTarget MethodType = "Target.detachFromTarget"
|
||
|
CommandTargetCreateBrowserContext MethodType = "Target.createBrowserContext"
|
||
|
CommandTargetDisposeBrowserContext MethodType = "Target.disposeBrowserContext"
|
||
|
CommandTargetCreateTarget MethodType = "Target.createTarget"
|
||
|
CommandTargetGetTargets MethodType = "Target.getTargets"
|
||
|
EventServiceWorkerWorkerRegistrationUpdated MethodType = "ServiceWorker.workerRegistrationUpdated"
|
||
|
EventServiceWorkerWorkerVersionUpdated MethodType = "ServiceWorker.workerVersionUpdated"
|
||
|
EventServiceWorkerWorkerErrorReported MethodType = "ServiceWorker.workerErrorReported"
|
||
|
CommandServiceWorkerEnable MethodType = "ServiceWorker.enable"
|
||
|
CommandServiceWorkerDisable MethodType = "ServiceWorker.disable"
|
||
|
CommandServiceWorkerUnregister MethodType = "ServiceWorker.unregister"
|
||
|
CommandServiceWorkerUpdateRegistration MethodType = "ServiceWorker.updateRegistration"
|
||
|
CommandServiceWorkerStartWorker MethodType = "ServiceWorker.startWorker"
|
||
|
CommandServiceWorkerSkipWaiting MethodType = "ServiceWorker.skipWaiting"
|
||
|
CommandServiceWorkerStopWorker MethodType = "ServiceWorker.stopWorker"
|
||
|
CommandServiceWorkerInspectWorker MethodType = "ServiceWorker.inspectWorker"
|
||
|
CommandServiceWorkerSetForceUpdateOnPageLoad MethodType = "ServiceWorker.setForceUpdateOnPageLoad"
|
||
|
CommandServiceWorkerDeliverPushMessage MethodType = "ServiceWorker.deliverPushMessage"
|
||
|
CommandServiceWorkerDispatchSyncEvent MethodType = "ServiceWorker.dispatchSyncEvent"
|
||
|
CommandInputDispatchKeyEvent MethodType = "Input.dispatchKeyEvent"
|
||
|
CommandInputDispatchMouseEvent MethodType = "Input.dispatchMouseEvent"
|
||
|
CommandInputDispatchTouchEvent MethodType = "Input.dispatchTouchEvent"
|
||
|
CommandInputEmulateTouchFromMouseEvent MethodType = "Input.emulateTouchFromMouseEvent"
|
||
|
CommandInputSynthesizePinchGesture MethodType = "Input.synthesizePinchGesture"
|
||
|
CommandInputSynthesizeScrollGesture MethodType = "Input.synthesizeScrollGesture"
|
||
|
CommandInputSynthesizeTapGesture MethodType = "Input.synthesizeTapGesture"
|
||
|
EventLayerTreeLayerTreeDidChange MethodType = "LayerTree.layerTreeDidChange"
|
||
|
EventLayerTreeLayerPainted MethodType = "LayerTree.layerPainted"
|
||
|
CommandLayerTreeEnable MethodType = "LayerTree.enable"
|
||
|
CommandLayerTreeDisable MethodType = "LayerTree.disable"
|
||
|
CommandLayerTreeCompositingReasons MethodType = "LayerTree.compositingReasons"
|
||
|
CommandLayerTreeMakeSnapshot MethodType = "LayerTree.makeSnapshot"
|
||
|
CommandLayerTreeLoadSnapshot MethodType = "LayerTree.loadSnapshot"
|
||
|
CommandLayerTreeReleaseSnapshot MethodType = "LayerTree.releaseSnapshot"
|
||
|
CommandLayerTreeProfileSnapshot MethodType = "LayerTree.profileSnapshot"
|
||
|
CommandLayerTreeReplaySnapshot MethodType = "LayerTree.replaySnapshot"
|
||
|
CommandLayerTreeSnapshotCommandLog MethodType = "LayerTree.snapshotCommandLog"
|
||
|
CommandDeviceOrientationSetDeviceOrientationOverride MethodType = "DeviceOrientation.setDeviceOrientationOverride"
|
||
|
CommandDeviceOrientationClearDeviceOrientationOverride MethodType = "DeviceOrientation.clearDeviceOrientationOverride"
|
||
|
EventTracingDataCollected MethodType = "Tracing.dataCollected"
|
||
|
EventTracingTracingComplete MethodType = "Tracing.tracingComplete"
|
||
|
EventTracingBufferUsage MethodType = "Tracing.bufferUsage"
|
||
|
CommandTracingStart MethodType = "Tracing.start"
|
||
|
CommandTracingEnd MethodType = "Tracing.end"
|
||
|
CommandTracingGetCategories MethodType = "Tracing.getCategories"
|
||
|
CommandTracingRequestMemoryDump MethodType = "Tracing.requestMemoryDump"
|
||
|
CommandTracingRecordClockSyncMarker MethodType = "Tracing.recordClockSyncMarker"
|
||
|
EventAnimationAnimationCreated MethodType = "Animation.animationCreated"
|
||
|
EventAnimationAnimationStarted MethodType = "Animation.animationStarted"
|
||
|
EventAnimationAnimationCanceled MethodType = "Animation.animationCanceled"
|
||
|
CommandAnimationEnable MethodType = "Animation.enable"
|
||
|
CommandAnimationDisable MethodType = "Animation.disable"
|
||
|
CommandAnimationGetPlaybackRate MethodType = "Animation.getPlaybackRate"
|
||
|
CommandAnimationSetPlaybackRate MethodType = "Animation.setPlaybackRate"
|
||
|
CommandAnimationGetCurrentTime MethodType = "Animation.getCurrentTime"
|
||
|
CommandAnimationSetPaused MethodType = "Animation.setPaused"
|
||
|
CommandAnimationSetTiming MethodType = "Animation.setTiming"
|
||
|
CommandAnimationSeekAnimations MethodType = "Animation.seekAnimations"
|
||
|
CommandAnimationReleaseAnimations MethodType = "Animation.releaseAnimations"
|
||
|
CommandAnimationResolveAnimation MethodType = "Animation.resolveAnimation"
|
||
|
CommandAccessibilityGetPartialAXTree MethodType = "Accessibility.getPartialAXTree"
|
||
|
CommandStorageClearDataForOrigin MethodType = "Storage.clearDataForOrigin"
|
||
|
EventLogEntryAdded MethodType = "Log.entryAdded"
|
||
|
CommandLogEnable MethodType = "Log.enable"
|
||
|
CommandLogDisable MethodType = "Log.disable"
|
||
|
CommandLogClear MethodType = "Log.clear"
|
||
|
CommandLogStartViolationsReport MethodType = "Log.startViolationsReport"
|
||
|
CommandLogStopViolationsReport MethodType = "Log.stopViolationsReport"
|
||
|
CommandSystemInfoGetInfo MethodType = "SystemInfo.getInfo"
|
||
|
EventTetheringAccepted MethodType = "Tethering.accepted"
|
||
|
CommandTetheringBind MethodType = "Tethering.bind"
|
||
|
CommandTetheringUnbind MethodType = "Tethering.unbind"
|
||
|
CommandSchemaGetDomains MethodType = "Schema.getDomains"
|
||
|
EventRuntimeExecutionContextCreated MethodType = "Runtime.executionContextCreated"
|
||
|
EventRuntimeExecutionContextDestroyed MethodType = "Runtime.executionContextDestroyed"
|
||
|
EventRuntimeExecutionContextsCleared MethodType = "Runtime.executionContextsCleared"
|
||
|
EventRuntimeExceptionThrown MethodType = "Runtime.exceptionThrown"
|
||
|
EventRuntimeExceptionRevoked MethodType = "Runtime.exceptionRevoked"
|
||
|
EventRuntimeConsoleAPICalled MethodType = "Runtime.consoleAPICalled"
|
||
|
EventRuntimeInspectRequested MethodType = "Runtime.inspectRequested"
|
||
|
CommandRuntimeEvaluate MethodType = "Runtime.evaluate"
|
||
|
CommandRuntimeAwaitPromise MethodType = "Runtime.awaitPromise"
|
||
|
CommandRuntimeCallFunctionOn MethodType = "Runtime.callFunctionOn"
|
||
|
CommandRuntimeGetProperties MethodType = "Runtime.getProperties"
|
||
|
CommandRuntimeReleaseObject MethodType = "Runtime.releaseObject"
|
||
|
CommandRuntimeReleaseObjectGroup MethodType = "Runtime.releaseObjectGroup"
|
||
|
CommandRuntimeRunIfWaitingForDebugger MethodType = "Runtime.runIfWaitingForDebugger"
|
||
|
CommandRuntimeEnable MethodType = "Runtime.enable"
|
||
|
CommandRuntimeDisable MethodType = "Runtime.disable"
|
||
|
CommandRuntimeDiscardConsoleEntries MethodType = "Runtime.discardConsoleEntries"
|
||
|
CommandRuntimeSetCustomObjectFormatterEnabled MethodType = "Runtime.setCustomObjectFormatterEnabled"
|
||
|
CommandRuntimeCompileScript MethodType = "Runtime.compileScript"
|
||
|
CommandRuntimeRunScript MethodType = "Runtime.runScript"
|
||
|
EventDebuggerScriptParsed MethodType = "Debugger.scriptParsed"
|
||
|
EventDebuggerScriptFailedToParse MethodType = "Debugger.scriptFailedToParse"
|
||
|
EventDebuggerBreakpointResolved MethodType = "Debugger.breakpointResolved"
|
||
|
EventDebuggerPaused MethodType = "Debugger.paused"
|
||
|
EventDebuggerResumed MethodType = "Debugger.resumed"
|
||
|
CommandDebuggerEnable MethodType = "Debugger.enable"
|
||
|
CommandDebuggerDisable MethodType = "Debugger.disable"
|
||
|
CommandDebuggerSetBreakpointsActive MethodType = "Debugger.setBreakpointsActive"
|
||
|
CommandDebuggerSetSkipAllPauses MethodType = "Debugger.setSkipAllPauses"
|
||
|
CommandDebuggerSetBreakpointByURL MethodType = "Debugger.setBreakpointByUrl"
|
||
|
CommandDebuggerSetBreakpoint MethodType = "Debugger.setBreakpoint"
|
||
|
CommandDebuggerRemoveBreakpoint MethodType = "Debugger.removeBreakpoint"
|
||
|
CommandDebuggerGetPossibleBreakpoints MethodType = "Debugger.getPossibleBreakpoints"
|
||
|
CommandDebuggerContinueToLocation MethodType = "Debugger.continueToLocation"
|
||
|
CommandDebuggerStepOver MethodType = "Debugger.stepOver"
|
||
|
CommandDebuggerStepInto MethodType = "Debugger.stepInto"
|
||
|
CommandDebuggerStepOut MethodType = "Debugger.stepOut"
|
||
|
CommandDebuggerPause MethodType = "Debugger.pause"
|
||
|
CommandDebuggerResume MethodType = "Debugger.resume"
|
||
|
CommandDebuggerSearchInContent MethodType = "Debugger.searchInContent"
|
||
|
CommandDebuggerSetScriptSource MethodType = "Debugger.setScriptSource"
|
||
|
CommandDebuggerRestartFrame MethodType = "Debugger.restartFrame"
|
||
|
CommandDebuggerGetScriptSource MethodType = "Debugger.getScriptSource"
|
||
|
CommandDebuggerSetPauseOnExceptions MethodType = "Debugger.setPauseOnExceptions"
|
||
|
CommandDebuggerEvaluateOnCallFrame MethodType = "Debugger.evaluateOnCallFrame"
|
||
|
CommandDebuggerSetVariableValue MethodType = "Debugger.setVariableValue"
|
||
|
CommandDebuggerSetAsyncCallStackDepth MethodType = "Debugger.setAsyncCallStackDepth"
|
||
|
CommandDebuggerSetBlackboxPatterns MethodType = "Debugger.setBlackboxPatterns"
|
||
|
CommandDebuggerSetBlackboxedRanges MethodType = "Debugger.setBlackboxedRanges"
|
||
|
EventProfilerConsoleProfileStarted MethodType = "Profiler.consoleProfileStarted"
|
||
|
EventProfilerConsoleProfileFinished MethodType = "Profiler.consoleProfileFinished"
|
||
|
CommandProfilerEnable MethodType = "Profiler.enable"
|
||
|
CommandProfilerDisable MethodType = "Profiler.disable"
|
||
|
CommandProfilerSetSamplingInterval MethodType = "Profiler.setSamplingInterval"
|
||
|
CommandProfilerStart MethodType = "Profiler.start"
|
||
|
CommandProfilerStop MethodType = "Profiler.stop"
|
||
|
EventHeapProfilerAddHeapSnapshotChunk MethodType = "HeapProfiler.addHeapSnapshotChunk"
|
||
|
EventHeapProfilerResetProfiles MethodType = "HeapProfiler.resetProfiles"
|
||
|
EventHeapProfilerReportHeapSnapshotProgress MethodType = "HeapProfiler.reportHeapSnapshotProgress"
|
||
|
EventHeapProfilerLastSeenObjectID MethodType = "HeapProfiler.lastSeenObjectId"
|
||
|
EventHeapProfilerHeapStatsUpdate MethodType = "HeapProfiler.heapStatsUpdate"
|
||
|
CommandHeapProfilerEnable MethodType = "HeapProfiler.enable"
|
||
|
CommandHeapProfilerDisable MethodType = "HeapProfiler.disable"
|
||
|
CommandHeapProfilerStartTrackingHeapObjects MethodType = "HeapProfiler.startTrackingHeapObjects"
|
||
|
CommandHeapProfilerStopTrackingHeapObjects MethodType = "HeapProfiler.stopTrackingHeapObjects"
|
||
|
CommandHeapProfilerTakeHeapSnapshot MethodType = "HeapProfiler.takeHeapSnapshot"
|
||
|
CommandHeapProfilerCollectGarbage MethodType = "HeapProfiler.collectGarbage"
|
||
|
CommandHeapProfilerGetObjectByHeapObjectID MethodType = "HeapProfiler.getObjectByHeapObjectId"
|
||
|
CommandHeapProfilerAddInspectedHeapObject MethodType = "HeapProfiler.addInspectedHeapObject"
|
||
|
CommandHeapProfilerGetHeapObjectID MethodType = "HeapProfiler.getHeapObjectId"
|
||
|
CommandHeapProfilerStartSampling MethodType = "HeapProfiler.startSampling"
|
||
|
CommandHeapProfilerStopSampling MethodType = "HeapProfiler.stopSampling"
|
||
|
)
|
||
|
|
||
|
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||
|
func (t MethodType) MarshalEasyJSON(out *jwriter.Writer) {
|
||
|
out.String(string(t))
|
||
|
}
|
||
|
|
||
|
// MarshalJSON satisfies json.Marshaler.
|
||
|
func (t MethodType) MarshalJSON() ([]byte, error) {
|
||
|
return easyjson.Marshal(t)
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||
|
func (t *MethodType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||
|
switch MethodType(in.String()) {
|
||
|
case EventInspectorDetached:
|
||
|
*t = EventInspectorDetached
|
||
|
case EventInspectorTargetCrashed:
|
||
|
*t = EventInspectorTargetCrashed
|
||
|
case CommandInspectorEnable:
|
||
|
*t = CommandInspectorEnable
|
||
|
case CommandInspectorDisable:
|
||
|
*t = CommandInspectorDisable
|
||
|
case CommandMemoryGetDOMCounters:
|
||
|
*t = CommandMemoryGetDOMCounters
|
||
|
case CommandMemorySetPressureNotificationsSuppressed:
|
||
|
*t = CommandMemorySetPressureNotificationsSuppressed
|
||
|
case CommandMemorySimulatePressureNotification:
|
||
|
*t = CommandMemorySimulatePressureNotification
|
||
|
case EventPageDomContentEventFired:
|
||
|
*t = EventPageDomContentEventFired
|
||
|
case EventPageLoadEventFired:
|
||
|
*t = EventPageLoadEventFired
|
||
|
case EventPageFrameAttached:
|
||
|
*t = EventPageFrameAttached
|
||
|
case EventPageFrameNavigated:
|
||
|
*t = EventPageFrameNavigated
|
||
|
case EventPageFrameDetached:
|
||
|
*t = EventPageFrameDetached
|
||
|
case EventPageFrameStartedLoading:
|
||
|
*t = EventPageFrameStartedLoading
|
||
|
case EventPageFrameStoppedLoading:
|
||
|
*t = EventPageFrameStoppedLoading
|
||
|
case EventPageFrameScheduledNavigation:
|
||
|
*t = EventPageFrameScheduledNavigation
|
||
|
case EventPageFrameClearedScheduledNavigation:
|
||
|
*t = EventPageFrameClearedScheduledNavigation
|
||
|
case EventPageFrameResized:
|
||
|
*t = EventPageFrameResized
|
||
|
case EventPageJavascriptDialogOpening:
|
||
|
*t = EventPageJavascriptDialogOpening
|
||
|
case EventPageJavascriptDialogClosed:
|
||
|
*t = EventPageJavascriptDialogClosed
|
||
|
case EventPageScreencastFrame:
|
||
|
*t = EventPageScreencastFrame
|
||
|
case EventPageScreencastVisibilityChanged:
|
||
|
*t = EventPageScreencastVisibilityChanged
|
||
|
case EventPageColorPicked:
|
||
|
*t = EventPageColorPicked
|
||
|
case EventPageInterstitialShown:
|
||
|
*t = EventPageInterstitialShown
|
||
|
case EventPageInterstitialHidden:
|
||
|
*t = EventPageInterstitialHidden
|
||
|
case EventPageNavigationRequested:
|
||
|
*t = EventPageNavigationRequested
|
||
|
case CommandPageEnable:
|
||
|
*t = CommandPageEnable
|
||
|
case CommandPageDisable:
|
||
|
*t = CommandPageDisable
|
||
|
case CommandPageAddScriptToEvaluateOnLoad:
|
||
|
*t = CommandPageAddScriptToEvaluateOnLoad
|
||
|
case CommandPageRemoveScriptToEvaluateOnLoad:
|
||
|
*t = CommandPageRemoveScriptToEvaluateOnLoad
|
||
|
case CommandPageSetAutoAttachToCreatedPages:
|
||
|
*t = CommandPageSetAutoAttachToCreatedPages
|
||
|
case CommandPageReload:
|
||
|
*t = CommandPageReload
|
||
|
case CommandPageNavigate:
|
||
|
*t = CommandPageNavigate
|
||
|
case CommandPageStopLoading:
|
||
|
*t = CommandPageStopLoading
|
||
|
case CommandPageGetNavigationHistory:
|
||
|
*t = CommandPageGetNavigationHistory
|
||
|
case CommandPageNavigateToHistoryEntry:
|
||
|
*t = CommandPageNavigateToHistoryEntry
|
||
|
case CommandPageGetResourceTree:
|
||
|
*t = CommandPageGetResourceTree
|
||
|
case CommandPageGetResourceContent:
|
||
|
*t = CommandPageGetResourceContent
|
||
|
case CommandPageSearchInResource:
|
||
|
*t = CommandPageSearchInResource
|
||
|
case CommandPageSetDocumentContent:
|
||
|
*t = CommandPageSetDocumentContent
|
||
|
case CommandPageCaptureScreenshot:
|
||
|
*t = CommandPageCaptureScreenshot
|
||
|
case CommandPageStartScreencast:
|
||
|
*t = CommandPageStartScreencast
|
||
|
case CommandPageStopScreencast:
|
||
|
*t = CommandPageStopScreencast
|
||
|
case CommandPageScreencastFrameAck:
|
||
|
*t = CommandPageScreencastFrameAck
|
||
|
case CommandPageHandleJavaScriptDialog:
|
||
|
*t = CommandPageHandleJavaScriptDialog
|
||
|
case CommandPageSetColorPickerEnabled:
|
||
|
*t = CommandPageSetColorPickerEnabled
|
||
|
case CommandPageConfigureOverlay:
|
||
|
*t = CommandPageConfigureOverlay
|
||
|
case CommandPageGetAppManifest:
|
||
|
*t = CommandPageGetAppManifest
|
||
|
case CommandPageRequestAppBanner:
|
||
|
*t = CommandPageRequestAppBanner
|
||
|
case CommandPageSetControlNavigations:
|
||
|
*t = CommandPageSetControlNavigations
|
||
|
case CommandPageProcessNavigation:
|
||
|
*t = CommandPageProcessNavigation
|
||
|
case CommandPageGetLayoutMetrics:
|
||
|
*t = CommandPageGetLayoutMetrics
|
||
|
case CommandRenderingSetShowPaintRects:
|
||
|
*t = CommandRenderingSetShowPaintRects
|
||
|
case CommandRenderingSetShowDebugBorders:
|
||
|
*t = CommandRenderingSetShowDebugBorders
|
||
|
case CommandRenderingSetShowFPSCounter:
|
||
|
*t = CommandRenderingSetShowFPSCounter
|
||
|
case CommandRenderingSetShowScrollBottleneckRects:
|
||
|
*t = CommandRenderingSetShowScrollBottleneckRects
|
||
|
case CommandRenderingSetShowViewportSizeOnResize:
|
||
|
*t = CommandRenderingSetShowViewportSizeOnResize
|
||
|
case EventEmulationVirtualTimeBudgetExpired:
|
||
|
*t = EventEmulationVirtualTimeBudgetExpired
|
||
|
case CommandEmulationSetDeviceMetricsOverride:
|
||
|
*t = CommandEmulationSetDeviceMetricsOverride
|
||
|
case CommandEmulationClearDeviceMetricsOverride:
|
||
|
*t = CommandEmulationClearDeviceMetricsOverride
|
||
|
case CommandEmulationForceViewport:
|
||
|
*t = CommandEmulationForceViewport
|
||
|
case CommandEmulationResetViewport:
|
||
|
*t = CommandEmulationResetViewport
|
||
|
case CommandEmulationResetPageScaleFactor:
|
||
|
*t = CommandEmulationResetPageScaleFactor
|
||
|
case CommandEmulationSetPageScaleFactor:
|
||
|
*t = CommandEmulationSetPageScaleFactor
|
||
|
case CommandEmulationSetVisibleSize:
|
||
|
*t = CommandEmulationSetVisibleSize
|
||
|
case CommandEmulationSetScriptExecutionDisabled:
|
||
|
*t = CommandEmulationSetScriptExecutionDisabled
|
||
|
case CommandEmulationSetGeolocationOverride:
|
||
|
*t = CommandEmulationSetGeolocationOverride
|
||
|
case CommandEmulationClearGeolocationOverride:
|
||
|
*t = CommandEmulationClearGeolocationOverride
|
||
|
case CommandEmulationSetTouchEmulationEnabled:
|
||
|
*t = CommandEmulationSetTouchEmulationEnabled
|
||
|
case CommandEmulationSetEmulatedMedia:
|
||
|
*t = CommandEmulationSetEmulatedMedia
|
||
|
case CommandEmulationSetCPUThrottlingRate:
|
||
|
*t = CommandEmulationSetCPUThrottlingRate
|
||
|
case CommandEmulationCanEmulate:
|
||
|
*t = CommandEmulationCanEmulate
|
||
|
case CommandEmulationSetVirtualTimePolicy:
|
||
|
*t = CommandEmulationSetVirtualTimePolicy
|
||
|
case EventSecuritySecurityStateChanged:
|
||
|
*t = EventSecuritySecurityStateChanged
|
||
|
case CommandSecurityEnable:
|
||
|
*t = CommandSecurityEnable
|
||
|
case CommandSecurityDisable:
|
||
|
*t = CommandSecurityDisable
|
||
|
case CommandSecurityShowCertificateViewer:
|
||
|
*t = CommandSecurityShowCertificateViewer
|
||
|
case EventNetworkResourceChangedPriority:
|
||
|
*t = EventNetworkResourceChangedPriority
|
||
|
case EventNetworkRequestWillBeSent:
|
||
|
*t = EventNetworkRequestWillBeSent
|
||
|
case EventNetworkRequestServedFromCache:
|
||
|
*t = EventNetworkRequestServedFromCache
|
||
|
case EventNetworkResponseReceived:
|
||
|
*t = EventNetworkResponseReceived
|
||
|
case EventNetworkDataReceived:
|
||
|
*t = EventNetworkDataReceived
|
||
|
case EventNetworkLoadingFinished:
|
||
|
*t = EventNetworkLoadingFinished
|
||
|
case EventNetworkLoadingFailed:
|
||
|
*t = EventNetworkLoadingFailed
|
||
|
case EventNetworkWebSocketWillSendHandshakeRequest:
|
||
|
*t = EventNetworkWebSocketWillSendHandshakeRequest
|
||
|
case EventNetworkWebSocketHandshakeResponseReceived:
|
||
|
*t = EventNetworkWebSocketHandshakeResponseReceived
|
||
|
case EventNetworkWebSocketCreated:
|
||
|
*t = EventNetworkWebSocketCreated
|
||
|
case EventNetworkWebSocketClosed:
|
||
|
*t = EventNetworkWebSocketClosed
|
||
|
case EventNetworkWebSocketFrameReceived:
|
||
|
*t = EventNetworkWebSocketFrameReceived
|
||
|
case EventNetworkWebSocketFrameError:
|
||
|
*t = EventNetworkWebSocketFrameError
|
||
|
case EventNetworkWebSocketFrameSent:
|
||
|
*t = EventNetworkWebSocketFrameSent
|
||
|
case EventNetworkEventSourceMessageReceived:
|
||
|
*t = EventNetworkEventSourceMessageReceived
|
||
|
case CommandNetworkEnable:
|
||
|
*t = CommandNetworkEnable
|
||
|
case CommandNetworkDisable:
|
||
|
*t = CommandNetworkDisable
|
||
|
case CommandNetworkSetUserAgentOverride:
|
||
|
*t = CommandNetworkSetUserAgentOverride
|
||
|
case CommandNetworkSetExtraHTTPHeaders:
|
||
|
*t = CommandNetworkSetExtraHTTPHeaders
|
||
|
case CommandNetworkGetResponseBody:
|
||
|
*t = CommandNetworkGetResponseBody
|
||
|
case CommandNetworkAddBlockedURL:
|
||
|
*t = CommandNetworkAddBlockedURL
|
||
|
case CommandNetworkRemoveBlockedURL:
|
||
|
*t = CommandNetworkRemoveBlockedURL
|
||
|
case CommandNetworkReplayXHR:
|
||
|
*t = CommandNetworkReplayXHR
|
||
|
case CommandNetworkSetMonitoringXHREnabled:
|
||
|
*t = CommandNetworkSetMonitoringXHREnabled
|
||
|
case CommandNetworkCanClearBrowserCache:
|
||
|
*t = CommandNetworkCanClearBrowserCache
|
||
|
case CommandNetworkClearBrowserCache:
|
||
|
*t = CommandNetworkClearBrowserCache
|
||
|
case CommandNetworkCanClearBrowserCookies:
|
||
|
*t = CommandNetworkCanClearBrowserCookies
|
||
|
case CommandNetworkClearBrowserCookies:
|
||
|
*t = CommandNetworkClearBrowserCookies
|
||
|
case CommandNetworkGetCookies:
|
||
|
*t = CommandNetworkGetCookies
|
||
|
case CommandNetworkGetAllCookies:
|
||
|
*t = CommandNetworkGetAllCookies
|
||
|
case CommandNetworkDeleteCookie:
|
||
|
*t = CommandNetworkDeleteCookie
|
||
|
case CommandNetworkSetCookie:
|
||
|
*t = CommandNetworkSetCookie
|
||
|
case CommandNetworkCanEmulateNetworkConditions:
|
||
|
*t = CommandNetworkCanEmulateNetworkConditions
|
||
|
case CommandNetworkEmulateNetworkConditions:
|
||
|
*t = CommandNetworkEmulateNetworkConditions
|
||
|
case CommandNetworkSetCacheDisabled:
|
||
|
*t = CommandNetworkSetCacheDisabled
|
||
|
case CommandNetworkSetBypassServiceWorker:
|
||
|
*t = CommandNetworkSetBypassServiceWorker
|
||
|
case CommandNetworkSetDataSizeLimitsForTest:
|
||
|
*t = CommandNetworkSetDataSizeLimitsForTest
|
||
|
case CommandNetworkGetCertificate:
|
||
|
*t = CommandNetworkGetCertificate
|
||
|
case EventDatabaseAddDatabase:
|
||
|
*t = EventDatabaseAddDatabase
|
||
|
case CommandDatabaseEnable:
|
||
|
*t = CommandDatabaseEnable
|
||
|
case CommandDatabaseDisable:
|
||
|
*t = CommandDatabaseDisable
|
||
|
case CommandDatabaseGetDatabaseTableNames:
|
||
|
*t = CommandDatabaseGetDatabaseTableNames
|
||
|
case CommandDatabaseExecuteSQL:
|
||
|
*t = CommandDatabaseExecuteSQL
|
||
|
case CommandIndexedDBEnable:
|
||
|
*t = CommandIndexedDBEnable
|
||
|
case CommandIndexedDBDisable:
|
||
|
*t = CommandIndexedDBDisable
|
||
|
case CommandIndexedDBRequestDatabaseNames:
|
||
|
*t = CommandIndexedDBRequestDatabaseNames
|
||
|
case CommandIndexedDBRequestDatabase:
|
||
|
*t = CommandIndexedDBRequestDatabase
|
||
|
case CommandIndexedDBRequestData:
|
||
|
*t = CommandIndexedDBRequestData
|
||
|
case CommandIndexedDBClearObjectStore:
|
||
|
*t = CommandIndexedDBClearObjectStore
|
||
|
case CommandCacheStorageRequestCacheNames:
|
||
|
*t = CommandCacheStorageRequestCacheNames
|
||
|
case CommandCacheStorageRequestEntries:
|
||
|
*t = CommandCacheStorageRequestEntries
|
||
|
case CommandCacheStorageDeleteCache:
|
||
|
*t = CommandCacheStorageDeleteCache
|
||
|
case CommandCacheStorageDeleteEntry:
|
||
|
*t = CommandCacheStorageDeleteEntry
|
||
|
case EventDOMStorageDomStorageItemsCleared:
|
||
|
*t = EventDOMStorageDomStorageItemsCleared
|
||
|
case EventDOMStorageDomStorageItemRemoved:
|
||
|
*t = EventDOMStorageDomStorageItemRemoved
|
||
|
case EventDOMStorageDomStorageItemAdded:
|
||
|
*t = EventDOMStorageDomStorageItemAdded
|
||
|
case EventDOMStorageDomStorageItemUpdated:
|
||
|
*t = EventDOMStorageDomStorageItemUpdated
|
||
|
case CommandDOMStorageEnable:
|
||
|
*t = CommandDOMStorageEnable
|
||
|
case CommandDOMStorageDisable:
|
||
|
*t = CommandDOMStorageDisable
|
||
|
case CommandDOMStorageClear:
|
||
|
*t = CommandDOMStorageClear
|
||
|
case CommandDOMStorageGetDOMStorageItems:
|
||
|
*t = CommandDOMStorageGetDOMStorageItems
|
||
|
case CommandDOMStorageSetDOMStorageItem:
|
||
|
*t = CommandDOMStorageSetDOMStorageItem
|
||
|
case CommandDOMStorageRemoveDOMStorageItem:
|
||
|
*t = CommandDOMStorageRemoveDOMStorageItem
|
||
|
case EventApplicationCacheApplicationCacheStatusUpdated:
|
||
|
*t = EventApplicationCacheApplicationCacheStatusUpdated
|
||
|
case EventApplicationCacheNetworkStateUpdated:
|
||
|
*t = EventApplicationCacheNetworkStateUpdated
|
||
|
case CommandApplicationCacheGetFramesWithManifests:
|
||
|
*t = CommandApplicationCacheGetFramesWithManifests
|
||
|
case CommandApplicationCacheEnable:
|
||
|
*t = CommandApplicationCacheEnable
|
||
|
case CommandApplicationCacheGetManifestForFrame:
|
||
|
*t = CommandApplicationCacheGetManifestForFrame
|
||
|
case CommandApplicationCacheGetApplicationCacheForFrame:
|
||
|
*t = CommandApplicationCacheGetApplicationCacheForFrame
|
||
|
case EventDOMDocumentUpdated:
|
||
|
*t = EventDOMDocumentUpdated
|
||
|
case EventDOMInspectNodeRequested:
|
||
|
*t = EventDOMInspectNodeRequested
|
||
|
case EventDOMSetChildNodes:
|
||
|
*t = EventDOMSetChildNodes
|
||
|
case EventDOMAttributeModified:
|
||
|
*t = EventDOMAttributeModified
|
||
|
case EventDOMAttributeRemoved:
|
||
|
*t = EventDOMAttributeRemoved
|
||
|
case EventDOMInlineStyleInvalidated:
|
||
|
*t = EventDOMInlineStyleInvalidated
|
||
|
case EventDOMCharacterDataModified:
|
||
|
*t = EventDOMCharacterDataModified
|
||
|
case EventDOMChildNodeCountUpdated:
|
||
|
*t = EventDOMChildNodeCountUpdated
|
||
|
case EventDOMChildNodeInserted:
|
||
|
*t = EventDOMChildNodeInserted
|
||
|
case EventDOMChildNodeRemoved:
|
||
|
*t = EventDOMChildNodeRemoved
|
||
|
case EventDOMShadowRootPushed:
|
||
|
*t = EventDOMShadowRootPushed
|
||
|
case EventDOMShadowRootPopped:
|
||
|
*t = EventDOMShadowRootPopped
|
||
|
case EventDOMPseudoElementAdded:
|
||
|
*t = EventDOMPseudoElementAdded
|
||
|
case EventDOMPseudoElementRemoved:
|
||
|
*t = EventDOMPseudoElementRemoved
|
||
|
case EventDOMDistributedNodesUpdated:
|
||
|
*t = EventDOMDistributedNodesUpdated
|
||
|
case EventDOMNodeHighlightRequested:
|
||
|
*t = EventDOMNodeHighlightRequested
|
||
|
case CommandDOMEnable:
|
||
|
*t = CommandDOMEnable
|
||
|
case CommandDOMDisable:
|
||
|
*t = CommandDOMDisable
|
||
|
case CommandDOMGetDocument:
|
||
|
*t = CommandDOMGetDocument
|
||
|
case CommandDOMCollectClassNamesFromSubtree:
|
||
|
*t = CommandDOMCollectClassNamesFromSubtree
|
||
|
case CommandDOMRequestChildNodes:
|
||
|
*t = CommandDOMRequestChildNodes
|
||
|
case CommandDOMQuerySelector:
|
||
|
*t = CommandDOMQuerySelector
|
||
|
case CommandDOMQuerySelectorAll:
|
||
|
*t = CommandDOMQuerySelectorAll
|
||
|
case CommandDOMSetNodeName:
|
||
|
*t = CommandDOMSetNodeName
|
||
|
case CommandDOMSetNodeValue:
|
||
|
*t = CommandDOMSetNodeValue
|
||
|
case CommandDOMRemoveNode:
|
||
|
*t = CommandDOMRemoveNode
|
||
|
case CommandDOMSetAttributeValue:
|
||
|
*t = CommandDOMSetAttributeValue
|
||
|
case CommandDOMSetAttributesAsText:
|
||
|
*t = CommandDOMSetAttributesAsText
|
||
|
case CommandDOMRemoveAttribute:
|
||
|
*t = CommandDOMRemoveAttribute
|
||
|
case CommandDOMGetOuterHTML:
|
||
|
*t = CommandDOMGetOuterHTML
|
||
|
case CommandDOMSetOuterHTML:
|
||
|
*t = CommandDOMSetOuterHTML
|
||
|
case CommandDOMPerformSearch:
|
||
|
*t = CommandDOMPerformSearch
|
||
|
case CommandDOMGetSearchResults:
|
||
|
*t = CommandDOMGetSearchResults
|
||
|
case CommandDOMDiscardSearchResults:
|
||
|
*t = CommandDOMDiscardSearchResults
|
||
|
case CommandDOMRequestNode:
|
||
|
*t = CommandDOMRequestNode
|
||
|
case CommandDOMSetInspectMode:
|
||
|
*t = CommandDOMSetInspectMode
|
||
|
case CommandDOMHighlightRect:
|
||
|
*t = CommandDOMHighlightRect
|
||
|
case CommandDOMHighlightQuad:
|
||
|
*t = CommandDOMHighlightQuad
|
||
|
case CommandDOMHighlightNode:
|
||
|
*t = CommandDOMHighlightNode
|
||
|
case CommandDOMHideHighlight:
|
||
|
*t = CommandDOMHideHighlight
|
||
|
case CommandDOMHighlightFrame:
|
||
|
*t = CommandDOMHighlightFrame
|
||
|
case CommandDOMPushNodeByPathToFrontend:
|
||
|
*t = CommandDOMPushNodeByPathToFrontend
|
||
|
case CommandDOMPushNodesByBackendIdsToFrontend:
|
||
|
*t = CommandDOMPushNodesByBackendIdsToFrontend
|
||
|
case CommandDOMSetInspectedNode:
|
||
|
*t = CommandDOMSetInspectedNode
|
||
|
case CommandDOMResolveNode:
|
||
|
*t = CommandDOMResolveNode
|
||
|
case CommandDOMGetAttributes:
|
||
|
*t = CommandDOMGetAttributes
|
||
|
case CommandDOMCopyTo:
|
||
|
*t = CommandDOMCopyTo
|
||
|
case CommandDOMMoveTo:
|
||
|
*t = CommandDOMMoveTo
|
||
|
case CommandDOMUndo:
|
||
|
*t = CommandDOMUndo
|
||
|
case CommandDOMRedo:
|
||
|
*t = CommandDOMRedo
|
||
|
case CommandDOMMarkUndoableState:
|
||
|
*t = CommandDOMMarkUndoableState
|
||
|
case CommandDOMFocus:
|
||
|
*t = CommandDOMFocus
|
||
|
case CommandDOMSetFileInputFiles:
|
||
|
*t = CommandDOMSetFileInputFiles
|
||
|
case CommandDOMGetBoxModel:
|
||
|
*t = CommandDOMGetBoxModel
|
||
|
case CommandDOMGetNodeForLocation:
|
||
|
*t = CommandDOMGetNodeForLocation
|
||
|
case CommandDOMGetRelayoutBoundary:
|
||
|
*t = CommandDOMGetRelayoutBoundary
|
||
|
case CommandDOMGetHighlightObjectForTest:
|
||
|
*t = CommandDOMGetHighlightObjectForTest
|
||
|
case EventCSSMediaQueryResultChanged:
|
||
|
*t = EventCSSMediaQueryResultChanged
|
||
|
case EventCSSFontsUpdated:
|
||
|
*t = EventCSSFontsUpdated
|
||
|
case EventCSSStyleSheetChanged:
|
||
|
*t = EventCSSStyleSheetChanged
|
||
|
case EventCSSStyleSheetAdded:
|
||
|
*t = EventCSSStyleSheetAdded
|
||
|
case EventCSSStyleSheetRemoved:
|
||
|
*t = EventCSSStyleSheetRemoved
|
||
|
case CommandCSSEnable:
|
||
|
*t = CommandCSSEnable
|
||
|
case CommandCSSDisable:
|
||
|
*t = CommandCSSDisable
|
||
|
case CommandCSSGetMatchedStylesForNode:
|
||
|
*t = CommandCSSGetMatchedStylesForNode
|
||
|
case CommandCSSGetInlineStylesForNode:
|
||
|
*t = CommandCSSGetInlineStylesForNode
|
||
|
case CommandCSSGetComputedStyleForNode:
|
||
|
*t = CommandCSSGetComputedStyleForNode
|
||
|
case CommandCSSGetPlatformFontsForNode:
|
||
|
*t = CommandCSSGetPlatformFontsForNode
|
||
|
case CommandCSSGetStyleSheetText:
|
||
|
*t = CommandCSSGetStyleSheetText
|
||
|
case CommandCSSCollectClassNames:
|
||
|
*t = CommandCSSCollectClassNames
|
||
|
case CommandCSSSetStyleSheetText:
|
||
|
*t = CommandCSSSetStyleSheetText
|
||
|
case CommandCSSSetRuleSelector:
|
||
|
*t = CommandCSSSetRuleSelector
|
||
|
case CommandCSSSetKeyframeKey:
|
||
|
*t = CommandCSSSetKeyframeKey
|
||
|
case CommandCSSSetStyleTexts:
|
||
|
*t = CommandCSSSetStyleTexts
|
||
|
case CommandCSSSetMediaText:
|
||
|
*t = CommandCSSSetMediaText
|
||
|
case CommandCSSCreateStyleSheet:
|
||
|
*t = CommandCSSCreateStyleSheet
|
||
|
case CommandCSSAddRule:
|
||
|
*t = CommandCSSAddRule
|
||
|
case CommandCSSForcePseudoState:
|
||
|
*t = CommandCSSForcePseudoState
|
||
|
case CommandCSSGetMediaQueries:
|
||
|
*t = CommandCSSGetMediaQueries
|
||
|
case CommandCSSSetEffectivePropertyValueForNode:
|
||
|
*t = CommandCSSSetEffectivePropertyValueForNode
|
||
|
case CommandCSSGetBackgroundColors:
|
||
|
*t = CommandCSSGetBackgroundColors
|
||
|
case CommandCSSGetLayoutTreeAndStyles:
|
||
|
*t = CommandCSSGetLayoutTreeAndStyles
|
||
|
case CommandCSSStartRuleUsageTracking:
|
||
|
*t = CommandCSSStartRuleUsageTracking
|
||
|
case CommandCSSStopRuleUsageTracking:
|
||
|
*t = CommandCSSStopRuleUsageTracking
|
||
|
case CommandIORead:
|
||
|
*t = CommandIORead
|
||
|
case CommandIOClose:
|
||
|
*t = CommandIOClose
|
||
|
case CommandDOMDebuggerSetDOMBreakpoint:
|
||
|
*t = CommandDOMDebuggerSetDOMBreakpoint
|
||
|
case CommandDOMDebuggerRemoveDOMBreakpoint:
|
||
|
*t = CommandDOMDebuggerRemoveDOMBreakpoint
|
||
|
case CommandDOMDebuggerSetEventListenerBreakpoint:
|
||
|
*t = CommandDOMDebuggerSetEventListenerBreakpoint
|
||
|
case CommandDOMDebuggerRemoveEventListenerBreakpoint:
|
||
|
*t = CommandDOMDebuggerRemoveEventListenerBreakpoint
|
||
|
case CommandDOMDebuggerSetInstrumentationBreakpoint:
|
||
|
*t = CommandDOMDebuggerSetInstrumentationBreakpoint
|
||
|
case CommandDOMDebuggerRemoveInstrumentationBreakpoint:
|
||
|
*t = CommandDOMDebuggerRemoveInstrumentationBreakpoint
|
||
|
case CommandDOMDebuggerSetXHRBreakpoint:
|
||
|
*t = CommandDOMDebuggerSetXHRBreakpoint
|
||
|
case CommandDOMDebuggerRemoveXHRBreakpoint:
|
||
|
*t = CommandDOMDebuggerRemoveXHRBreakpoint
|
||
|
case CommandDOMDebuggerGetEventListeners:
|
||
|
*t = CommandDOMDebuggerGetEventListeners
|
||
|
case EventTargetTargetCreated:
|
||
|
*t = EventTargetTargetCreated
|
||
|
case EventTargetTargetDestroyed:
|
||
|
*t = EventTargetTargetDestroyed
|
||
|
case EventTargetAttachedToTarget:
|
||
|
*t = EventTargetAttachedToTarget
|
||
|
case EventTargetDetachedFromTarget:
|
||
|
*t = EventTargetDetachedFromTarget
|
||
|
case EventTargetReceivedMessageFromTarget:
|
||
|
*t = EventTargetReceivedMessageFromTarget
|
||
|
case CommandTargetSetDiscoverTargets:
|
||
|
*t = CommandTargetSetDiscoverTargets
|
||
|
case CommandTargetSetAutoAttach:
|
||
|
*t = CommandTargetSetAutoAttach
|
||
|
case CommandTargetSetAttachToFrames:
|
||
|
*t = CommandTargetSetAttachToFrames
|
||
|
case CommandTargetSetRemoteLocations:
|
||
|
*t = CommandTargetSetRemoteLocations
|
||
|
case CommandTargetSendMessageToTarget:
|
||
|
*t = CommandTargetSendMessageToTarget
|
||
|
case CommandTargetGetTargetInfo:
|
||
|
*t = CommandTargetGetTargetInfo
|
||
|
case CommandTargetActivateTarget:
|
||
|
*t = CommandTargetActivateTarget
|
||
|
case CommandTargetCloseTarget:
|
||
|
*t = CommandTargetCloseTarget
|
||
|
case CommandTargetAttachToTarget:
|
||
|
*t = CommandTargetAttachToTarget
|
||
|
case CommandTargetDetachFromTarget:
|
||
|
*t = CommandTargetDetachFromTarget
|
||
|
case CommandTargetCreateBrowserContext:
|
||
|
*t = CommandTargetCreateBrowserContext
|
||
|
case CommandTargetDisposeBrowserContext:
|
||
|
*t = CommandTargetDisposeBrowserContext
|
||
|
case CommandTargetCreateTarget:
|
||
|
*t = CommandTargetCreateTarget
|
||
|
case CommandTargetGetTargets:
|
||
|
*t = CommandTargetGetTargets
|
||
|
case EventServiceWorkerWorkerRegistrationUpdated:
|
||
|
*t = EventServiceWorkerWorkerRegistrationUpdated
|
||
|
case EventServiceWorkerWorkerVersionUpdated:
|
||
|
*t = EventServiceWorkerWorkerVersionUpdated
|
||
|
case EventServiceWorkerWorkerErrorReported:
|
||
|
*t = EventServiceWorkerWorkerErrorReported
|
||
|
case CommandServiceWorkerEnable:
|
||
|
*t = CommandServiceWorkerEnable
|
||
|
case CommandServiceWorkerDisable:
|
||
|
*t = CommandServiceWorkerDisable
|
||
|
case CommandServiceWorkerUnregister:
|
||
|
*t = CommandServiceWorkerUnregister
|
||
|
case CommandServiceWorkerUpdateRegistration:
|
||
|
*t = CommandServiceWorkerUpdateRegistration
|
||
|
case CommandServiceWorkerStartWorker:
|
||
|
*t = CommandServiceWorkerStartWorker
|
||
|
case CommandServiceWorkerSkipWaiting:
|
||
|
*t = CommandServiceWorkerSkipWaiting
|
||
|
case CommandServiceWorkerStopWorker:
|
||
|
*t = CommandServiceWorkerStopWorker
|
||
|
case CommandServiceWorkerInspectWorker:
|
||
|
*t = CommandServiceWorkerInspectWorker
|
||
|
case CommandServiceWorkerSetForceUpdateOnPageLoad:
|
||
|
*t = CommandServiceWorkerSetForceUpdateOnPageLoad
|
||
|
case CommandServiceWorkerDeliverPushMessage:
|
||
|
*t = CommandServiceWorkerDeliverPushMessage
|
||
|
case CommandServiceWorkerDispatchSyncEvent:
|
||
|
*t = CommandServiceWorkerDispatchSyncEvent
|
||
|
case CommandInputDispatchKeyEvent:
|
||
|
*t = CommandInputDispatchKeyEvent
|
||
|
case CommandInputDispatchMouseEvent:
|
||
|
*t = CommandInputDispatchMouseEvent
|
||
|
case CommandInputDispatchTouchEvent:
|
||
|
*t = CommandInputDispatchTouchEvent
|
||
|
case CommandInputEmulateTouchFromMouseEvent:
|
||
|
*t = CommandInputEmulateTouchFromMouseEvent
|
||
|
case CommandInputSynthesizePinchGesture:
|
||
|
*t = CommandInputSynthesizePinchGesture
|
||
|
case CommandInputSynthesizeScrollGesture:
|
||
|
*t = CommandInputSynthesizeScrollGesture
|
||
|
case CommandInputSynthesizeTapGesture:
|
||
|
*t = CommandInputSynthesizeTapGesture
|
||
|
case EventLayerTreeLayerTreeDidChange:
|
||
|
*t = EventLayerTreeLayerTreeDidChange
|
||
|
case EventLayerTreeLayerPainted:
|
||
|
*t = EventLayerTreeLayerPainted
|
||
|
case CommandLayerTreeEnable:
|
||
|
*t = CommandLayerTreeEnable
|
||
|
case CommandLayerTreeDisable:
|
||
|
*t = CommandLayerTreeDisable
|
||
|
case CommandLayerTreeCompositingReasons:
|
||
|
*t = CommandLayerTreeCompositingReasons
|
||
|
case CommandLayerTreeMakeSnapshot:
|
||
|
*t = CommandLayerTreeMakeSnapshot
|
||
|
case CommandLayerTreeLoadSnapshot:
|
||
|
*t = CommandLayerTreeLoadSnapshot
|
||
|
case CommandLayerTreeReleaseSnapshot:
|
||
|
*t = CommandLayerTreeReleaseSnapshot
|
||
|
case CommandLayerTreeProfileSnapshot:
|
||
|
*t = CommandLayerTreeProfileSnapshot
|
||
|
case CommandLayerTreeReplaySnapshot:
|
||
|
*t = CommandLayerTreeReplaySnapshot
|
||
|
case CommandLayerTreeSnapshotCommandLog:
|
||
|
*t = CommandLayerTreeSnapshotCommandLog
|
||
|
case CommandDeviceOrientationSetDeviceOrientationOverride:
|
||
|
*t = CommandDeviceOrientationSetDeviceOrientationOverride
|
||
|
case CommandDeviceOrientationClearDeviceOrientationOverride:
|
||
|
*t = CommandDeviceOrientationClearDeviceOrientationOverride
|
||
|
case EventTracingDataCollected:
|
||
|
*t = EventTracingDataCollected
|
||
|
case EventTracingTracingComplete:
|
||
|
*t = EventTracingTracingComplete
|
||
|
case EventTracingBufferUsage:
|
||
|
*t = EventTracingBufferUsage
|
||
|
case CommandTracingStart:
|
||
|
*t = CommandTracingStart
|
||
|
case CommandTracingEnd:
|
||
|
*t = CommandTracingEnd
|
||
|
case CommandTracingGetCategories:
|
||
|
*t = CommandTracingGetCategories
|
||
|
case CommandTracingRequestMemoryDump:
|
||
|
*t = CommandTracingRequestMemoryDump
|
||
|
case CommandTracingRecordClockSyncMarker:
|
||
|
*t = CommandTracingRecordClockSyncMarker
|
||
|
case EventAnimationAnimationCreated:
|
||
|
*t = EventAnimationAnimationCreated
|
||
|
case EventAnimationAnimationStarted:
|
||
|
*t = EventAnimationAnimationStarted
|
||
|
case EventAnimationAnimationCanceled:
|
||
|
*t = EventAnimationAnimationCanceled
|
||
|
case CommandAnimationEnable:
|
||
|
*t = CommandAnimationEnable
|
||
|
case CommandAnimationDisable:
|
||
|
*t = CommandAnimationDisable
|
||
|
case CommandAnimationGetPlaybackRate:
|
||
|
*t = CommandAnimationGetPlaybackRate
|
||
|
case CommandAnimationSetPlaybackRate:
|
||
|
*t = CommandAnimationSetPlaybackRate
|
||
|
case CommandAnimationGetCurrentTime:
|
||
|
*t = CommandAnimationGetCurrentTime
|
||
|
case CommandAnimationSetPaused:
|
||
|
*t = CommandAnimationSetPaused
|
||
|
case CommandAnimationSetTiming:
|
||
|
*t = CommandAnimationSetTiming
|
||
|
case CommandAnimationSeekAnimations:
|
||
|
*t = CommandAnimationSeekAnimations
|
||
|
case CommandAnimationReleaseAnimations:
|
||
|
*t = CommandAnimationReleaseAnimations
|
||
|
case CommandAnimationResolveAnimation:
|
||
|
*t = CommandAnimationResolveAnimation
|
||
|
case CommandAccessibilityGetPartialAXTree:
|
||
|
*t = CommandAccessibilityGetPartialAXTree
|
||
|
case CommandStorageClearDataForOrigin:
|
||
|
*t = CommandStorageClearDataForOrigin
|
||
|
case EventLogEntryAdded:
|
||
|
*t = EventLogEntryAdded
|
||
|
case CommandLogEnable:
|
||
|
*t = CommandLogEnable
|
||
|
case CommandLogDisable:
|
||
|
*t = CommandLogDisable
|
||
|
case CommandLogClear:
|
||
|
*t = CommandLogClear
|
||
|
case CommandLogStartViolationsReport:
|
||
|
*t = CommandLogStartViolationsReport
|
||
|
case CommandLogStopViolationsReport:
|
||
|
*t = CommandLogStopViolationsReport
|
||
|
case CommandSystemInfoGetInfo:
|
||
|
*t = CommandSystemInfoGetInfo
|
||
|
case EventTetheringAccepted:
|
||
|
*t = EventTetheringAccepted
|
||
|
case CommandTetheringBind:
|
||
|
*t = CommandTetheringBind
|
||
|
case CommandTetheringUnbind:
|
||
|
*t = CommandTetheringUnbind
|
||
|
case CommandSchemaGetDomains:
|
||
|
*t = CommandSchemaGetDomains
|
||
|
case EventRuntimeExecutionContextCreated:
|
||
|
*t = EventRuntimeExecutionContextCreated
|
||
|
case EventRuntimeExecutionContextDestroyed:
|
||
|
*t = EventRuntimeExecutionContextDestroyed
|
||
|
case EventRuntimeExecutionContextsCleared:
|
||
|
*t = EventRuntimeExecutionContextsCleared
|
||
|
case EventRuntimeExceptionThrown:
|
||
|
*t = EventRuntimeExceptionThrown
|
||
|
case EventRuntimeExceptionRevoked:
|
||
|
*t = EventRuntimeExceptionRevoked
|
||
|
case EventRuntimeConsoleAPICalled:
|
||
|
*t = EventRuntimeConsoleAPICalled
|
||
|
case EventRuntimeInspectRequested:
|
||
|
*t = EventRuntimeInspectRequested
|
||
|
case CommandRuntimeEvaluate:
|
||
|
*t = CommandRuntimeEvaluate
|
||
|
case CommandRuntimeAwaitPromise:
|
||
|
*t = CommandRuntimeAwaitPromise
|
||
|
case CommandRuntimeCallFunctionOn:
|
||
|
*t = CommandRuntimeCallFunctionOn
|
||
|
case CommandRuntimeGetProperties:
|
||
|
*t = CommandRuntimeGetProperties
|
||
|
case CommandRuntimeReleaseObject:
|
||
|
*t = CommandRuntimeReleaseObject
|
||
|
case CommandRuntimeReleaseObjectGroup:
|
||
|
*t = CommandRuntimeReleaseObjectGroup
|
||
|
case CommandRuntimeRunIfWaitingForDebugger:
|
||
|
*t = CommandRuntimeRunIfWaitingForDebugger
|
||
|
case CommandRuntimeEnable:
|
||
|
*t = CommandRuntimeEnable
|
||
|
case CommandRuntimeDisable:
|
||
|
*t = CommandRuntimeDisable
|
||
|
case CommandRuntimeDiscardConsoleEntries:
|
||
|
*t = CommandRuntimeDiscardConsoleEntries
|
||
|
case CommandRuntimeSetCustomObjectFormatterEnabled:
|
||
|
*t = CommandRuntimeSetCustomObjectFormatterEnabled
|
||
|
case CommandRuntimeCompileScript:
|
||
|
*t = CommandRuntimeCompileScript
|
||
|
case CommandRuntimeRunScript:
|
||
|
*t = CommandRuntimeRunScript
|
||
|
case EventDebuggerScriptParsed:
|
||
|
*t = EventDebuggerScriptParsed
|
||
|
case EventDebuggerScriptFailedToParse:
|
||
|
*t = EventDebuggerScriptFailedToParse
|
||
|
case EventDebuggerBreakpointResolved:
|
||
|
*t = EventDebuggerBreakpointResolved
|
||
|
case EventDebuggerPaused:
|
||
|
*t = EventDebuggerPaused
|
||
|
case EventDebuggerResumed:
|
||
|
*t = EventDebuggerResumed
|
||
|
case CommandDebuggerEnable:
|
||
|
*t = CommandDebuggerEnable
|
||
|
case CommandDebuggerDisable:
|
||
|
*t = CommandDebuggerDisable
|
||
|
case CommandDebuggerSetBreakpointsActive:
|
||
|
*t = CommandDebuggerSetBreakpointsActive
|
||
|
case CommandDebuggerSetSkipAllPauses:
|
||
|
*t = CommandDebuggerSetSkipAllPauses
|
||
|
case CommandDebuggerSetBreakpointByURL:
|
||
|
*t = CommandDebuggerSetBreakpointByURL
|
||
|
case CommandDebuggerSetBreakpoint:
|
||
|
*t = CommandDebuggerSetBreakpoint
|
||
|
case CommandDebuggerRemoveBreakpoint:
|
||
|
*t = CommandDebuggerRemoveBreakpoint
|
||
|
case CommandDebuggerGetPossibleBreakpoints:
|
||
|
*t = CommandDebuggerGetPossibleBreakpoints
|
||
|
case CommandDebuggerContinueToLocation:
|
||
|
*t = CommandDebuggerContinueToLocation
|
||
|
case CommandDebuggerStepOver:
|
||
|
*t = CommandDebuggerStepOver
|
||
|
case CommandDebuggerStepInto:
|
||
|
*t = CommandDebuggerStepInto
|
||
|
case CommandDebuggerStepOut:
|
||
|
*t = CommandDebuggerStepOut
|
||
|
case CommandDebuggerPause:
|
||
|
*t = CommandDebuggerPause
|
||
|
case CommandDebuggerResume:
|
||
|
*t = CommandDebuggerResume
|
||
|
case CommandDebuggerSearchInContent:
|
||
|
*t = CommandDebuggerSearchInContent
|
||
|
case CommandDebuggerSetScriptSource:
|
||
|
*t = CommandDebuggerSetScriptSource
|
||
|
case CommandDebuggerRestartFrame:
|
||
|
*t = CommandDebuggerRestartFrame
|
||
|
case CommandDebuggerGetScriptSource:
|
||
|
*t = CommandDebuggerGetScriptSource
|
||
|
case CommandDebuggerSetPauseOnExceptions:
|
||
|
*t = CommandDebuggerSetPauseOnExceptions
|
||
|
case CommandDebuggerEvaluateOnCallFrame:
|
||
|
*t = CommandDebuggerEvaluateOnCallFrame
|
||
|
case CommandDebuggerSetVariableValue:
|
||
|
*t = CommandDebuggerSetVariableValue
|
||
|
case CommandDebuggerSetAsyncCallStackDepth:
|
||
|
*t = CommandDebuggerSetAsyncCallStackDepth
|
||
|
case CommandDebuggerSetBlackboxPatterns:
|
||
|
*t = CommandDebuggerSetBlackboxPatterns
|
||
|
case CommandDebuggerSetBlackboxedRanges:
|
||
|
*t = CommandDebuggerSetBlackboxedRanges
|
||
|
case EventProfilerConsoleProfileStarted:
|
||
|
*t = EventProfilerConsoleProfileStarted
|
||
|
case EventProfilerConsoleProfileFinished:
|
||
|
*t = EventProfilerConsoleProfileFinished
|
||
|
case CommandProfilerEnable:
|
||
|
*t = CommandProfilerEnable
|
||
|
case CommandProfilerDisable:
|
||
|
*t = CommandProfilerDisable
|
||
|
case CommandProfilerSetSamplingInterval:
|
||
|
*t = CommandProfilerSetSamplingInterval
|
||
|
case CommandProfilerStart:
|
||
|
*t = CommandProfilerStart
|
||
|
case CommandProfilerStop:
|
||
|
*t = CommandProfilerStop
|
||
|
case EventHeapProfilerAddHeapSnapshotChunk:
|
||
|
*t = EventHeapProfilerAddHeapSnapshotChunk
|
||
|
case EventHeapProfilerResetProfiles:
|
||
|
*t = EventHeapProfilerResetProfiles
|
||
|
case EventHeapProfilerReportHeapSnapshotProgress:
|
||
|
*t = EventHeapProfilerReportHeapSnapshotProgress
|
||
|
case EventHeapProfilerLastSeenObjectID:
|
||
|
*t = EventHeapProfilerLastSeenObjectID
|
||
|
case EventHeapProfilerHeapStatsUpdate:
|
||
|
*t = EventHeapProfilerHeapStatsUpdate
|
||
|
case CommandHeapProfilerEnable:
|
||
|
*t = CommandHeapProfilerEnable
|
||
|
case CommandHeapProfilerDisable:
|
||
|
*t = CommandHeapProfilerDisable
|
||
|
case CommandHeapProfilerStartTrackingHeapObjects:
|
||
|
*t = CommandHeapProfilerStartTrackingHeapObjects
|
||
|
case CommandHeapProfilerStopTrackingHeapObjects:
|
||
|
*t = CommandHeapProfilerStopTrackingHeapObjects
|
||
|
case CommandHeapProfilerTakeHeapSnapshot:
|
||
|
*t = CommandHeapProfilerTakeHeapSnapshot
|
||
|
case CommandHeapProfilerCollectGarbage:
|
||
|
*t = CommandHeapProfilerCollectGarbage
|
||
|
case CommandHeapProfilerGetObjectByHeapObjectID:
|
||
|
*t = CommandHeapProfilerGetObjectByHeapObjectID
|
||
|
case CommandHeapProfilerAddInspectedHeapObject:
|
||
|
*t = CommandHeapProfilerAddInspectedHeapObject
|
||
|
case CommandHeapProfilerGetHeapObjectID:
|
||
|
*t = CommandHeapProfilerGetHeapObjectID
|
||
|
case CommandHeapProfilerStartSampling:
|
||
|
*t = CommandHeapProfilerStartSampling
|
||
|
case CommandHeapProfilerStopSampling:
|
||
|
*t = CommandHeapProfilerStopSampling
|
||
|
|
||
|
default:
|
||
|
in.AddError(errors.New("unknown MethodType value"))
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON satisfies json.Unmarshaler.
|
||
|
func (t *MethodType) UnmarshalJSON(buf []byte) error {
|
||
|
return easyjson.Unmarshal(buf, t)
|
||
|
}
|
||
|
|
||
|
// Domain returns the Chrome Debugging Protocol domain of the event or command.
|
||
|
func (t MethodType) Domain() string {
|
||
|
return string(t[:strings.IndexByte(string(t), '.')])
|
||
|
}
|
||
|
|
||
|
// ErrorType error type.
|
||
|
type ErrorType string
|
||
|
|
||
|
// String returns the ErrorType as string value.
|
||
|
func (t ErrorType) String() string {
|
||
|
return string(t)
|
||
|
}
|
||
|
|
||
|
// ErrorType values.
|
||
|
const (
|
||
|
ErrContextDone ErrorType = "context done"
|
||
|
ErrChannelClosed ErrorType = "channel closed"
|
||
|
ErrInvalidResult ErrorType = "invalid result"
|
||
|
ErrUnknownResult ErrorType = "unknown result"
|
||
|
)
|
||
|
|
||
|
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||
|
func (t ErrorType) MarshalEasyJSON(out *jwriter.Writer) {
|
||
|
out.String(string(t))
|
||
|
}
|
||
|
|
||
|
// MarshalJSON satisfies json.Marshaler.
|
||
|
func (t ErrorType) MarshalJSON() ([]byte, error) {
|
||
|
return easyjson.Marshal(t)
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||
|
func (t *ErrorType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||
|
switch ErrorType(in.String()) {
|
||
|
case ErrContextDone:
|
||
|
*t = ErrContextDone
|
||
|
case ErrChannelClosed:
|
||
|
*t = ErrChannelClosed
|
||
|
case ErrInvalidResult:
|
||
|
*t = ErrInvalidResult
|
||
|
case ErrUnknownResult:
|
||
|
*t = ErrUnknownResult
|
||
|
|
||
|
default:
|
||
|
in.AddError(errors.New("unknown ErrorType value"))
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON satisfies json.Unmarshaler.
|
||
|
func (t *ErrorType) UnmarshalJSON(buf []byte) error {
|
||
|
return easyjson.Unmarshal(buf, t)
|
||
|
}
|
||
|
|
||
|
// Error satisfies the error interface.
|
||
|
func (t ErrorType) Error() string {
|
||
|
return string(t)
|
||
|
}
|
||
|
|
||
|
// FrameHandler is the common interface for a frame handler.
|
||
|
type FrameHandler interface {
|
||
|
SetActive(context.Context, FrameID) error
|
||
|
GetRoot(context.Context) (*Node, error)
|
||
|
WaitFrame(context.Context, FrameID) (*Frame, error)
|
||
|
WaitNode(context.Context, *Frame, NodeID) (*Node, error)
|
||
|
Listen(...MethodType) <-chan interface{}
|
||
|
|
||
|
// Execute executes the specified command using the supplied context and
|
||
|
// parameters.
|
||
|
Execute(context.Context, MethodType, easyjson.RawMessage) <-chan interface{}
|
||
|
}
|
||
|
|
||
|
// Empty is an empty JSON object message
|
||
|
var Empty = easyjson.RawMessage(`{}`)
|
||
|
|
||
|
// FrameID unique frame identifier.
|
||
|
type FrameID string
|
||
|
|
||
|
// String returns the FrameID as string value.
|
||
|
func (t FrameID) String() string {
|
||
|
return string(t)
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||
|
func (t *FrameID) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||
|
buf := in.Raw()
|
||
|
if l := len(buf); l > 2 && buf[0] == '"' && buf[l-1] == '"' {
|
||
|
buf = buf[1 : l-1]
|
||
|
}
|
||
|
|
||
|
*t = FrameID(buf)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON satisfies json.Unmarshaler.
|
||
|
func (t *FrameID) UnmarshalJSON(buf []byte) error {
|
||
|
return easyjson.Unmarshal(buf, t)
|
||
|
}
|
||
|
|
||
|
// Frame information about the Frame on the page.
|
||
|
type Frame struct {
|
||
|
ID FrameID `json:"id,omitempty"` // Frame unique identifier.
|
||
|
ParentID FrameID `json:"parentId,omitempty"` // Parent frame identifier.
|
||
|
LoaderID LoaderID `json:"loaderId,omitempty"` // Identifier of the loader associated with this frame.
|
||
|
Name string `json:"name,omitempty"` // Frame's name as specified in the tag.
|
||
|
URL string `json:"url,omitempty"` // Frame document's URL.
|
||
|
SecurityOrigin string `json:"securityOrigin,omitempty"` // Frame document's security origin.
|
||
|
MimeType string `json:"mimeType,omitempty"` // Frame document's mimeType as determined by the browser.
|
||
|
State FrameState `json:"-"` // Frame state.
|
||
|
Root *Node `json:"-"` // Frame document root.
|
||
|
Nodes map[NodeID]*Node `json:"-"` // Frame nodes.
|
||
|
sync.RWMutex `json:"-"` // Read write mutex.
|
||
|
}
|
||
|
|
||
|
// FrameState is the state of a Frame.
|
||
|
type FrameState uint16
|
||
|
|
||
|
// FrameState enum values.
|
||
|
const (
|
||
|
FrameDOMContentEventFired FrameState = 1 << (15 - iota)
|
||
|
FrameLoadEventFired
|
||
|
FrameAttached
|
||
|
FrameNavigated
|
||
|
FrameLoading
|
||
|
FrameScheduledNavigation
|
||
|
)
|
||
|
|
||
|
// frameStateNames are the names of the frame states.
|
||
|
var frameStateNames = map[FrameState]string{
|
||
|
FrameDOMContentEventFired: "DOMContentEventFired",
|
||
|
FrameLoadEventFired: "LoadEventFired",
|
||
|
FrameAttached: "Attached",
|
||
|
FrameNavigated: "Navigated",
|
||
|
FrameLoading: "Loading",
|
||
|
FrameScheduledNavigation: "ScheduledNavigation",
|
||
|
}
|
||
|
|
||
|
// String satisfies stringer interface.
|
||
|
func (fs FrameState) String() string {
|
||
|
var s []string
|
||
|
for k, v := range frameStateNames {
|
||
|
if fs&k != 0 {
|
||
|
s = append(s, v)
|
||
|
}
|
||
|
}
|
||
|
return "[" + strings.Join(s, " ") + "]"
|
||
|
}
|
||
|
|
||
|
// LoaderID unique loader identifier.
|
||
|
type LoaderID string
|
||
|
|
||
|
// String returns the LoaderID as string value.
|
||
|
func (t LoaderID) String() string {
|
||
|
return string(t)
|
||
|
}
|
||
|
|
||
|
// Timestamp number of seconds since epoch.
|
||
|
type Timestamp time.Time
|
||
|
|
||
|
// Time returns the Timestamp as time.Time value.
|
||
|
func (t Timestamp) Time() time.Time {
|
||
|
return time.Time(t)
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||
|
func (t Timestamp) MarshalEasyJSON(out *jwriter.Writer) {
|
||
|
out.Float64(float64(time.Time(t).Sub(sysutil.BootTime())) / float64(time.Second))
|
||
|
}
|
||
|
|
||
|
// MarshalJSON satisfies json.Marshaler.
|
||
|
func (t Timestamp) MarshalJSON() ([]byte, error) {
|
||
|
return easyjson.Marshal(t)
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||
|
func (t *Timestamp) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||
|
*t = Timestamp(sysutil.BootTime().Add(time.Duration(in.Float64() * float64(time.Second))))
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON satisfies json.Unmarshaler.
|
||
|
func (t *Timestamp) UnmarshalJSON(buf []byte) error {
|
||
|
return easyjson.Unmarshal(buf, t)
|
||
|
}
|
||
|
|
||
|
// NodeID unique DOM node identifier.
|
||
|
type NodeID int64
|
||
|
|
||
|
// Int64 returns the NodeID as int64 value.
|
||
|
func (t NodeID) Int64() int64 {
|
||
|
return int64(t)
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||
|
func (t *NodeID) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||
|
buf := in.Raw()
|
||
|
if l := len(buf); l > 2 && buf[0] == '"' && buf[l-1] == '"' {
|
||
|
buf = buf[1 : l-1]
|
||
|
}
|
||
|
|
||
|
v, err := strconv.ParseInt(string(buf), 10, 64)
|
||
|
if err != nil {
|
||
|
in.AddError(err)
|
||
|
}
|
||
|
|
||
|
*t = NodeID(v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON satisfies json.Unmarshaler.
|
||
|
func (t *NodeID) UnmarshalJSON(buf []byte) error {
|
||
|
return easyjson.Unmarshal(buf, t)
|
||
|
}
|
||
|
|
||
|
// BackendNodeID unique DOM node identifier used to reference a node that may
|
||
|
// not have been pushed to the front-end.
|
||
|
type BackendNodeID int64
|
||
|
|
||
|
// Int64 returns the BackendNodeID as int64 value.
|
||
|
func (t BackendNodeID) Int64() int64 {
|
||
|
return int64(t)
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||
|
func (t *BackendNodeID) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||
|
buf := in.Raw()
|
||
|
if l := len(buf); l > 2 && buf[0] == '"' && buf[l-1] == '"' {
|
||
|
buf = buf[1 : l-1]
|
||
|
}
|
||
|
|
||
|
v, err := strconv.ParseInt(string(buf), 10, 64)
|
||
|
if err != nil {
|
||
|
in.AddError(err)
|
||
|
}
|
||
|
|
||
|
*t = BackendNodeID(v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON satisfies json.Unmarshaler.
|
||
|
func (t *BackendNodeID) UnmarshalJSON(buf []byte) error {
|
||
|
return easyjson.Unmarshal(buf, t)
|
||
|
}
|
||
|
|
||
|
// BackendNode backend node with a friendly name.
|
||
|
type BackendNode struct {
|
||
|
NodeType NodeType `json:"nodeType,omitempty"` // Node's nodeType.
|
||
|
NodeName string `json:"nodeName,omitempty"` // Node's nodeName.
|
||
|
BackendNodeID BackendNodeID `json:"backendNodeId,omitempty"`
|
||
|
}
|
||
|
|
||
|
// PseudoType pseudo element type.
|
||
|
type PseudoType string
|
||
|
|
||
|
// String returns the PseudoType as string value.
|
||
|
func (t PseudoType) String() string {
|
||
|
return string(t)
|
||
|
}
|
||
|
|
||
|
// PseudoType values.
|
||
|
const (
|
||
|
PseudoTypeFirstLine PseudoType = "first-line"
|
||
|
PseudoTypeFirstLetter PseudoType = "first-letter"
|
||
|
PseudoTypeBefore PseudoType = "before"
|
||
|
PseudoTypeAfter PseudoType = "after"
|
||
|
PseudoTypeBackdrop PseudoType = "backdrop"
|
||
|
PseudoTypeSelection PseudoType = "selection"
|
||
|
PseudoTypeFirstLineInherited PseudoType = "first-line-inherited"
|
||
|
PseudoTypeScrollbar PseudoType = "scrollbar"
|
||
|
PseudoTypeScrollbarThumb PseudoType = "scrollbar-thumb"
|
||
|
PseudoTypeScrollbarButton PseudoType = "scrollbar-button"
|
||
|
PseudoTypeScrollbarTrack PseudoType = "scrollbar-track"
|
||
|
PseudoTypeScrollbarTrackPiece PseudoType = "scrollbar-track-piece"
|
||
|
PseudoTypeScrollbarCorner PseudoType = "scrollbar-corner"
|
||
|
PseudoTypeResizer PseudoType = "resizer"
|
||
|
PseudoTypeInputListButton PseudoType = "input-list-button"
|
||
|
)
|
||
|
|
||
|
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||
|
func (t PseudoType) MarshalEasyJSON(out *jwriter.Writer) {
|
||
|
out.String(string(t))
|
||
|
}
|
||
|
|
||
|
// MarshalJSON satisfies json.Marshaler.
|
||
|
func (t PseudoType) MarshalJSON() ([]byte, error) {
|
||
|
return easyjson.Marshal(t)
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||
|
func (t *PseudoType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||
|
switch PseudoType(in.String()) {
|
||
|
case PseudoTypeFirstLine:
|
||
|
*t = PseudoTypeFirstLine
|
||
|
case PseudoTypeFirstLetter:
|
||
|
*t = PseudoTypeFirstLetter
|
||
|
case PseudoTypeBefore:
|
||
|
*t = PseudoTypeBefore
|
||
|
case PseudoTypeAfter:
|
||
|
*t = PseudoTypeAfter
|
||
|
case PseudoTypeBackdrop:
|
||
|
*t = PseudoTypeBackdrop
|
||
|
case PseudoTypeSelection:
|
||
|
*t = PseudoTypeSelection
|
||
|
case PseudoTypeFirstLineInherited:
|
||
|
*t = PseudoTypeFirstLineInherited
|
||
|
case PseudoTypeScrollbar:
|
||
|
*t = PseudoTypeScrollbar
|
||
|
case PseudoTypeScrollbarThumb:
|
||
|
*t = PseudoTypeScrollbarThumb
|
||
|
case PseudoTypeScrollbarButton:
|
||
|
*t = PseudoTypeScrollbarButton
|
||
|
case PseudoTypeScrollbarTrack:
|
||
|
*t = PseudoTypeScrollbarTrack
|
||
|
case PseudoTypeScrollbarTrackPiece:
|
||
|
*t = PseudoTypeScrollbarTrackPiece
|
||
|
case PseudoTypeScrollbarCorner:
|
||
|
*t = PseudoTypeScrollbarCorner
|
||
|
case PseudoTypeResizer:
|
||
|
*t = PseudoTypeResizer
|
||
|
case PseudoTypeInputListButton:
|
||
|
*t = PseudoTypeInputListButton
|
||
|
|
||
|
default:
|
||
|
in.AddError(errors.New("unknown PseudoType value"))
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON satisfies json.Unmarshaler.
|
||
|
func (t *PseudoType) UnmarshalJSON(buf []byte) error {
|
||
|
return easyjson.Unmarshal(buf, t)
|
||
|
}
|
||
|
|
||
|
// ShadowRootType shadow root type.
|
||
|
type ShadowRootType string
|
||
|
|
||
|
// String returns the ShadowRootType as string value.
|
||
|
func (t ShadowRootType) String() string {
|
||
|
return string(t)
|
||
|
}
|
||
|
|
||
|
// ShadowRootType values.
|
||
|
const (
|
||
|
ShadowRootTypeUserAgent ShadowRootType = "user-agent"
|
||
|
ShadowRootTypeOpen ShadowRootType = "open"
|
||
|
ShadowRootTypeClosed ShadowRootType = "closed"
|
||
|
)
|
||
|
|
||
|
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||
|
func (t ShadowRootType) MarshalEasyJSON(out *jwriter.Writer) {
|
||
|
out.String(string(t))
|
||
|
}
|
||
|
|
||
|
// MarshalJSON satisfies json.Marshaler.
|
||
|
func (t ShadowRootType) MarshalJSON() ([]byte, error) {
|
||
|
return easyjson.Marshal(t)
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||
|
func (t *ShadowRootType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||
|
switch ShadowRootType(in.String()) {
|
||
|
case ShadowRootTypeUserAgent:
|
||
|
*t = ShadowRootTypeUserAgent
|
||
|
case ShadowRootTypeOpen:
|
||
|
*t = ShadowRootTypeOpen
|
||
|
case ShadowRootTypeClosed:
|
||
|
*t = ShadowRootTypeClosed
|
||
|
|
||
|
default:
|
||
|
in.AddError(errors.New("unknown ShadowRootType value"))
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON satisfies json.Unmarshaler.
|
||
|
func (t *ShadowRootType) UnmarshalJSON(buf []byte) error {
|
||
|
return easyjson.Unmarshal(buf, t)
|
||
|
}
|
||
|
|
||
|
// Node dOM interaction is implemented in terms of mirror objects that
|
||
|
// represent the actual DOM nodes. DOMNode is a base node mirror type.
|
||
|
type Node struct {
|
||
|
NodeID NodeID `json:"nodeId,omitempty"` // Node identifier that is passed into the rest of the DOM messages as the nodeId. Backend will only push node with given id once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client.
|
||
|
BackendNodeID BackendNodeID `json:"backendNodeId,omitempty"` // The BackendNodeId for this node.
|
||
|
NodeType NodeType `json:"nodeType,omitempty"` // Node's nodeType.
|
||
|
NodeName string `json:"nodeName,omitempty"` // Node's nodeName.
|
||
|
LocalName string `json:"localName,omitempty"` // Node's localName.
|
||
|
NodeValue string `json:"nodeValue,omitempty"` // Node's nodeValue.
|
||
|
ChildNodeCount int64 `json:"childNodeCount,omitempty"` // Child count for Container nodes.
|
||
|
Children []*Node `json:"children,omitempty"` // Child nodes of this node when requested with children.
|
||
|
Attributes []string `json:"attributes,omitempty"` // Attributes of the Element node in the form of flat array [name1, value1, name2, value2].
|
||
|
DocumentURL string `json:"documentURL,omitempty"` // Document URL that Document or FrameOwner node points to.
|
||
|
BaseURL string `json:"baseURL,omitempty"` // Base URL that Document or FrameOwner node uses for URL completion.
|
||
|
PublicID string `json:"publicId,omitempty"` // DocumentType's publicId.
|
||
|
SystemID string `json:"systemId,omitempty"` // DocumentType's systemId.
|
||
|
InternalSubset string `json:"internalSubset,omitempty"` // DocumentType's internalSubset.
|
||
|
XMLVersion string `json:"xmlVersion,omitempty"` // Document's XML version in case of XML documents.
|
||
|
Name string `json:"name,omitempty"` // Attr's name.
|
||
|
Value string `json:"value,omitempty"` // Attr's value.
|
||
|
PseudoType PseudoType `json:"pseudoType,omitempty"` // Pseudo element type for this node.
|
||
|
ShadowRootType ShadowRootType `json:"shadowRootType,omitempty"` // Shadow root type.
|
||
|
FrameID FrameID `json:"frameId,omitempty"` // Frame ID for frame owner elements.
|
||
|
ContentDocument *Node `json:"contentDocument,omitempty"` // Content document for frame owner elements.
|
||
|
ShadowRoots []*Node `json:"shadowRoots,omitempty"` // Shadow root list for given element host.
|
||
|
TemplateContent *Node `json:"templateContent,omitempty"` // Content document fragment for template elements.
|
||
|
PseudoElements []*Node `json:"pseudoElements,omitempty"` // Pseudo elements associated with this node.
|
||
|
ImportedDocument *Node `json:"importedDocument,omitempty"` // Import document for the HTMLImport links.
|
||
|
DistributedNodes []*BackendNode `json:"distributedNodes,omitempty"` // Distributed nodes for given insertion point.
|
||
|
IsSVG bool `json:"isSVG,omitempty"` // Whether the node is SVG.
|
||
|
Parent *Node `json:"-"` // Parent node.
|
||
|
Invalidated chan struct{} `json:"-"` // Invalidated channel.
|
||
|
State NodeState `json:"-"` // Node state.
|
||
|
sync.RWMutex `json:"-"` // Read write mutex.
|
||
|
}
|
||
|
|
||
|
// AttributeValue returns the named attribute for the node.
|
||
|
func (n *Node) AttributeValue(name string) string {
|
||
|
n.RLock()
|
||
|
defer n.RUnlock()
|
||
|
|
||
|
for i := 0; i < len(n.Attributes); i += 2 {
|
||
|
if n.Attributes[i] == name {
|
||
|
return n.Attributes[i+1]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return ""
|
||
|
}
|
||
|
|
||
|
// xpath builds the xpath string.
|
||
|
func (n *Node) xpath(stopWhenID bool) string {
|
||
|
p := ""
|
||
|
pos := ""
|
||
|
id := n.AttributeValue("id")
|
||
|
switch {
|
||
|
case n.Parent == nil:
|
||
|
return n.LocalName
|
||
|
|
||
|
case stopWhenID && id != "":
|
||
|
p = "/"
|
||
|
pos = `[@id='` + id + `']`
|
||
|
|
||
|
case n.Parent != nil:
|
||
|
i := 0
|
||
|
var found bool
|
||
|
for j := 0; j < len(n.Parent.Children); j++ {
|
||
|
if n.Parent.Children[j].LocalName == n.LocalName {
|
||
|
i++
|
||
|
}
|
||
|
if n.Parent.Children[j].NodeID == n.NodeID {
|
||
|
found = true
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
|
||
|
p = n.Parent.xpath(stopWhenID)
|
||
|
if found {
|
||
|
pos = "[" + strconv.Itoa(i) + "]"
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return p + "/" + n.LocalName + pos
|
||
|
}
|
||
|
|
||
|
// XPathByID returns the XPath tree for the node, stopping at the first parent
|
||
|
// with an id attribute.
|
||
|
func (n *Node) XPathByID() string {
|
||
|
return n.xpath(true)
|
||
|
}
|
||
|
|
||
|
// XPath returns the full XPath tree for the node.
|
||
|
func (n *Node) XPath() string {
|
||
|
return n.xpath(false)
|
||
|
}
|
||
|
|
||
|
// NodeState is the state of a DOM node.
|
||
|
type NodeState uint8
|
||
|
|
||
|
// NodeState enum values.
|
||
|
const (
|
||
|
NodeReady NodeState = 1 << (7 - iota)
|
||
|
NodeVisible
|
||
|
NodeHighlighted
|
||
|
)
|
||
|
|
||
|
// nodeStateNames are the names of the node states.
|
||
|
var nodeStateNames = map[NodeState]string{
|
||
|
NodeReady: "Ready",
|
||
|
NodeVisible: "Visible",
|
||
|
NodeHighlighted: "Highlighted",
|
||
|
}
|
||
|
|
||
|
// String satisfies stringer interface.
|
||
|
func (ns NodeState) String() string {
|
||
|
var s []string
|
||
|
for k, v := range nodeStateNames {
|
||
|
if ns&k != 0 {
|
||
|
s = append(s, v)
|
||
|
}
|
||
|
}
|
||
|
return "[" + strings.Join(s, " ") + "]"
|
||
|
}
|
||
|
|
||
|
// RGBA a structure holding an RGBA color.
|
||
|
type RGBA struct {
|
||
|
R int64 `json:"r,omitempty"` // The red component, in the [0-255] range.
|
||
|
G int64 `json:"g,omitempty"` // The green component, in the [0-255] range.
|
||
|
B int64 `json:"b,omitempty"` // The blue component, in the [0-255] range.
|
||
|
A float64 `json:"a,omitempty"` // The alpha component, in the [0-1] range (default: 1).
|
||
|
}
|
||
|
|
||
|
// NodeType node type.
|
||
|
type NodeType int64
|
||
|
|
||
|
// Int64 returns the NodeType as int64 value.
|
||
|
func (t NodeType) Int64() int64 {
|
||
|
return int64(t)
|
||
|
}
|
||
|
|
||
|
// NodeType values.
|
||
|
const (
|
||
|
NodeTypeElement NodeType = 1
|
||
|
NodeTypeAttribute NodeType = 2
|
||
|
NodeTypeText NodeType = 3
|
||
|
NodeTypeCDATA NodeType = 4
|
||
|
NodeTypeEntityReference NodeType = 5
|
||
|
NodeTypeEntity NodeType = 6
|
||
|
NodeTypeProcessingInstruction NodeType = 7
|
||
|
NodeTypeComment NodeType = 8
|
||
|
NodeTypeDocument NodeType = 9
|
||
|
NodeTypeDocumentType NodeType = 10
|
||
|
NodeTypeDocumentFragment NodeType = 11
|
||
|
NodeTypeNotation NodeType = 12
|
||
|
)
|
||
|
|
||
|
// String returns the NodeType as string value.
|
||
|
func (t NodeType) String() string {
|
||
|
switch t {
|
||
|
case NodeTypeElement:
|
||
|
return "Element"
|
||
|
case NodeTypeAttribute:
|
||
|
return "Attribute"
|
||
|
case NodeTypeText:
|
||
|
return "Text"
|
||
|
case NodeTypeCDATA:
|
||
|
return "CDATA"
|
||
|
case NodeTypeEntityReference:
|
||
|
return "EntityReference"
|
||
|
case NodeTypeEntity:
|
||
|
return "Entity"
|
||
|
case NodeTypeProcessingInstruction:
|
||
|
return "ProcessingInstruction"
|
||
|
case NodeTypeComment:
|
||
|
return "Comment"
|
||
|
case NodeTypeDocument:
|
||
|
return "Document"
|
||
|
case NodeTypeDocumentType:
|
||
|
return "DocumentType"
|
||
|
case NodeTypeDocumentFragment:
|
||
|
return "DocumentFragment"
|
||
|
case NodeTypeNotation:
|
||
|
return "Notation"
|
||
|
}
|
||
|
|
||
|
return fmt.Sprintf("NodeType(%d)", t)
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||
|
func (t NodeType) MarshalEasyJSON(out *jwriter.Writer) {
|
||
|
out.Int64(int64(t))
|
||
|
}
|
||
|
|
||
|
// MarshalJSON satisfies json.Marshaler.
|
||
|
func (t NodeType) MarshalJSON() ([]byte, error) {
|
||
|
return easyjson.Marshal(t)
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||
|
func (t *NodeType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||
|
switch NodeType(in.Int64()) {
|
||
|
case NodeTypeElement:
|
||
|
*t = NodeTypeElement
|
||
|
case NodeTypeAttribute:
|
||
|
*t = NodeTypeAttribute
|
||
|
case NodeTypeText:
|
||
|
*t = NodeTypeText
|
||
|
case NodeTypeCDATA:
|
||
|
*t = NodeTypeCDATA
|
||
|
case NodeTypeEntityReference:
|
||
|
*t = NodeTypeEntityReference
|
||
|
case NodeTypeEntity:
|
||
|
*t = NodeTypeEntity
|
||
|
case NodeTypeProcessingInstruction:
|
||
|
*t = NodeTypeProcessingInstruction
|
||
|
case NodeTypeComment:
|
||
|
*t = NodeTypeComment
|
||
|
case NodeTypeDocument:
|
||
|
*t = NodeTypeDocument
|
||
|
case NodeTypeDocumentType:
|
||
|
*t = NodeTypeDocumentType
|
||
|
case NodeTypeDocumentFragment:
|
||
|
*t = NodeTypeDocumentFragment
|
||
|
case NodeTypeNotation:
|
||
|
*t = NodeTypeNotation
|
||
|
|
||
|
default:
|
||
|
in.AddError(errors.New("unknown NodeType value"))
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON satisfies json.Unmarshaler.
|
||
|
func (t *NodeType) UnmarshalJSON(buf []byte) error {
|
||
|
return easyjson.Unmarshal(buf, t)
|
||
|
}
|
||
|
|
||
|
type ComputedProperty struct {
|
||
|
Name string `json:"name,omitempty"` // Computed style property name.
|
||
|
Value string `json:"value,omitempty"` // Computed style property value.
|
||
|
}
|