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" ) // Code generated by chromedp-gen. DO NOT EDIT. // MessageError message error type. type MessageError struct { Code int64 `json:"code"` // Error code. Message string `json:"message"` // 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" CommandMemoryPrepareForLeakDetection MethodType = "Memory.prepareForLeakDetection" CommandMemorySetPressureNotificationsSuppressed MethodType = "Memory.setPressureNotificationsSuppressed" CommandMemorySimulatePressureNotification MethodType = "Memory.simulatePressureNotification" EventPerformanceMetrics MethodType = "Performance.metrics" CommandPerformanceEnable MethodType = "Performance.enable" CommandPerformanceDisable MethodType = "Performance.disable" CommandPerformanceGetMetrics MethodType = "Performance.getMetrics" EventPageDomContentEventFired MethodType = "Page.domContentEventFired" EventPageLoadEventFired MethodType = "Page.loadEventFired" EventPageLifecycleEvent MethodType = "Page.lifecycleEvent" 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" EventPageInterstitialShown MethodType = "Page.interstitialShown" EventPageInterstitialHidden MethodType = "Page.interstitialHidden" EventPageWindowOpen MethodType = "Page.windowOpen" CommandPageEnable MethodType = "Page.enable" CommandPageDisable MethodType = "Page.disable" CommandPageAddScriptToEvaluateOnNewDocument MethodType = "Page.addScriptToEvaluateOnNewDocument" CommandPageRemoveScriptToEvaluateOnNewDocument MethodType = "Page.removeScriptToEvaluateOnNewDocument" CommandPageSetAutoAttachToCreatedPages MethodType = "Page.setAutoAttachToCreatedPages" CommandPageSetLifecycleEventsEnabled MethodType = "Page.setLifecycleEventsEnabled" CommandPageReload MethodType = "Page.reload" CommandPageSetAdBlockingEnabled MethodType = "Page.setAdBlockingEnabled" CommandPageNavigate MethodType = "Page.navigate" CommandPageStopLoading MethodType = "Page.stopLoading" CommandPageGetNavigationHistory MethodType = "Page.getNavigationHistory" CommandPageNavigateToHistoryEntry MethodType = "Page.navigateToHistoryEntry" CommandPageGetResourceTree MethodType = "Page.getResourceTree" CommandPageGetFrameTree MethodType = "Page.getFrameTree" CommandPageGetResourceContent MethodType = "Page.getResourceContent" CommandPageSearchInResource MethodType = "Page.searchInResource" CommandPageSetDocumentContent MethodType = "Page.setDocumentContent" CommandPageCaptureScreenshot MethodType = "Page.captureScreenshot" CommandPagePrintToPDF MethodType = "Page.printToPDF" CommandPageStartScreencast MethodType = "Page.startScreencast" CommandPageStopScreencast MethodType = "Page.stopScreencast" CommandPageScreencastFrameAck MethodType = "Page.screencastFrameAck" CommandPageHandleJavaScriptDialog MethodType = "Page.handleJavaScriptDialog" CommandPageGetAppManifest MethodType = "Page.getAppManifest" CommandPageRequestAppBanner MethodType = "Page.requestAppBanner" CommandPageGetLayoutMetrics MethodType = "Page.getLayoutMetrics" CommandPageCreateIsolatedWorld MethodType = "Page.createIsolatedWorld" CommandPageBringToFront MethodType = "Page.bringToFront" CommandPageSetDownloadBehavior MethodType = "Page.setDownloadBehavior" EventOverlayNodeHighlightRequested MethodType = "Overlay.nodeHighlightRequested" EventOverlayInspectNodeRequested MethodType = "Overlay.inspectNodeRequested" EventOverlayScreenshotRequested MethodType = "Overlay.screenshotRequested" CommandOverlayEnable MethodType = "Overlay.enable" CommandOverlayDisable MethodType = "Overlay.disable" CommandOverlaySetShowPaintRects MethodType = "Overlay.setShowPaintRects" CommandOverlaySetShowDebugBorders MethodType = "Overlay.setShowDebugBorders" CommandOverlaySetShowFPSCounter MethodType = "Overlay.setShowFPSCounter" CommandOverlaySetShowScrollBottleneckRects MethodType = "Overlay.setShowScrollBottleneckRects" CommandOverlaySetShowViewportSizeOnResize MethodType = "Overlay.setShowViewportSizeOnResize" CommandOverlaySetPausedInDebuggerMessage MethodType = "Overlay.setPausedInDebuggerMessage" CommandOverlaySetSuspended MethodType = "Overlay.setSuspended" CommandOverlaySetInspectMode MethodType = "Overlay.setInspectMode" CommandOverlayHighlightRect MethodType = "Overlay.highlightRect" CommandOverlayHighlightQuad MethodType = "Overlay.highlightQuad" CommandOverlayHighlightNode MethodType = "Overlay.highlightNode" CommandOverlayHighlightFrame MethodType = "Overlay.highlightFrame" CommandOverlayHideHighlight MethodType = "Overlay.hideHighlight" CommandOverlayGetHighlightObjectForTest MethodType = "Overlay.getHighlightObjectForTest" EventEmulationVirtualTimeBudgetExpired MethodType = "Emulation.virtualTimeBudgetExpired" EventEmulationVirtualTimeAdvanced MethodType = "Emulation.virtualTimeAdvanced" EventEmulationVirtualTimePaused MethodType = "Emulation.virtualTimePaused" CommandEmulationSetDeviceMetricsOverride MethodType = "Emulation.setDeviceMetricsOverride" CommandEmulationClearDeviceMetricsOverride MethodType = "Emulation.clearDeviceMetricsOverride" CommandEmulationResetPageScaleFactor MethodType = "Emulation.resetPageScaleFactor" CommandEmulationSetPageScaleFactor MethodType = "Emulation.setPageScaleFactor" CommandEmulationSetScriptExecutionDisabled MethodType = "Emulation.setScriptExecutionDisabled" CommandEmulationSetGeolocationOverride MethodType = "Emulation.setGeolocationOverride" CommandEmulationClearGeolocationOverride MethodType = "Emulation.clearGeolocationOverride" CommandEmulationSetTouchEmulationEnabled MethodType = "Emulation.setTouchEmulationEnabled" CommandEmulationSetEmitTouchEventsForMouse MethodType = "Emulation.setEmitTouchEventsForMouse" CommandEmulationSetEmulatedMedia MethodType = "Emulation.setEmulatedMedia" CommandEmulationSetCPUThrottlingRate MethodType = "Emulation.setCPUThrottlingRate" CommandEmulationCanEmulate MethodType = "Emulation.canEmulate" CommandEmulationSetVirtualTimePolicy MethodType = "Emulation.setVirtualTimePolicy" CommandEmulationSetNavigatorOverrides MethodType = "Emulation.setNavigatorOverrides" CommandEmulationSetDefaultBackgroundColorOverride MethodType = "Emulation.setDefaultBackgroundColorOverride" EventSecuritySecurityStateChanged MethodType = "Security.securityStateChanged" EventSecurityCertificateError MethodType = "Security.certificateError" CommandSecurityEnable MethodType = "Security.enable" CommandSecurityDisable MethodType = "Security.disable" CommandSecurityHandleCertificateError MethodType = "Security.handleCertificateError" CommandSecuritySetOverrideCertificateErrors MethodType = "Security.setOverrideCertificateErrors" CommandAuditsGetEncodedResponse MethodType = "Audits.getEncodedResponse" 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" EventNetworkRequestIntercepted MethodType = "Network.requestIntercepted" CommandNetworkEnable MethodType = "Network.enable" CommandNetworkDisable MethodType = "Network.disable" CommandNetworkSetUserAgentOverride MethodType = "Network.setUserAgentOverride" CommandNetworkSearchInResponseBody MethodType = "Network.searchInResponseBody" CommandNetworkSetExtraHTTPHeaders MethodType = "Network.setExtraHTTPHeaders" CommandNetworkGetResponseBody MethodType = "Network.getResponseBody" CommandNetworkSetBlockedURLS MethodType = "Network.setBlockedURLs" CommandNetworkReplayXHR MethodType = "Network.replayXHR" CommandNetworkClearBrowserCache MethodType = "Network.clearBrowserCache" CommandNetworkClearBrowserCookies MethodType = "Network.clearBrowserCookies" CommandNetworkGetCookies MethodType = "Network.getCookies" CommandNetworkGetAllCookies MethodType = "Network.getAllCookies" CommandNetworkDeleteCookies MethodType = "Network.deleteCookies" CommandNetworkSetCookie MethodType = "Network.setCookie" CommandNetworkSetCookies MethodType = "Network.setCookies" CommandNetworkEmulateNetworkConditions MethodType = "Network.emulateNetworkConditions" CommandNetworkSetCacheDisabled MethodType = "Network.setCacheDisabled" CommandNetworkSetBypassServiceWorker MethodType = "Network.setBypassServiceWorker" CommandNetworkSetDataSizeLimitsForTest MethodType = "Network.setDataSizeLimitsForTest" CommandNetworkGetCertificate MethodType = "Network.getCertificate" CommandNetworkSetRequestInterception MethodType = "Network.setRequestInterception" CommandNetworkContinueInterceptedRequest MethodType = "Network.continueInterceptedRequest" CommandNetworkGetResponseBodyForInterception MethodType = "Network.getResponseBodyForInterception" 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" CommandIndexedDBDeleteDatabase MethodType = "IndexedDB.deleteDatabase" CommandCacheStorageRequestCacheNames MethodType = "CacheStorage.requestCacheNames" CommandCacheStorageRequestEntries MethodType = "CacheStorage.requestEntries" CommandCacheStorageDeleteCache MethodType = "CacheStorage.deleteCache" CommandCacheStorageDeleteEntry MethodType = "CacheStorage.deleteEntry" CommandCacheStorageRequestCachedResponse MethodType = "CacheStorage.requestCachedResponse" 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" 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" CommandDOMEnable MethodType = "DOM.enable" CommandDOMDisable MethodType = "DOM.disable" CommandDOMGetDocument MethodType = "DOM.getDocument" CommandDOMGetFlattenedDocument MethodType = "DOM.getFlattenedDocument" 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" 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" CommandDOMDescribeNode MethodType = "DOM.describeNode" 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" CommandCSSStartRuleUsageTracking MethodType = "CSS.startRuleUsageTracking" CommandCSSTakeCoverageDelta MethodType = "CSS.takeCoverageDelta" CommandCSSStopRuleUsageTracking MethodType = "CSS.stopRuleUsageTracking" CommandDOMSnapshotGetSnapshot MethodType = "DOMSnapshot.getSnapshot" CommandIORead MethodType = "IO.read" CommandIOClose MethodType = "IO.close" CommandIOResolveBlob MethodType = "IO.resolveBlob" 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" EventTargetTargetInfoChanged MethodType = "Target.targetInfoChanged" 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" EventHeadlessExperimentalNeedsBeginFramesChanged MethodType = "HeadlessExperimental.needsBeginFramesChanged" EventHeadlessExperimentalMainFrameReadyForScreenshots MethodType = "HeadlessExperimental.mainFrameReadyForScreenshots" CommandHeadlessExperimentalEnable MethodType = "HeadlessExperimental.enable" CommandHeadlessExperimentalDisable MethodType = "HeadlessExperimental.disable" CommandHeadlessExperimentalBeginFrame MethodType = "HeadlessExperimental.beginFrame" 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" CommandServiceWorkerStopAllWorkers MethodType = "ServiceWorker.stopAllWorkers" CommandServiceWorkerInspectWorker MethodType = "ServiceWorker.inspectWorker" CommandServiceWorkerSetForceUpdateOnPageLoad MethodType = "ServiceWorker.setForceUpdateOnPageLoad" CommandServiceWorkerDeliverPushMessage MethodType = "ServiceWorker.deliverPushMessage" CommandServiceWorkerDispatchSyncEvent MethodType = "ServiceWorker.dispatchSyncEvent" CommandInputSetIgnoreInputEvents MethodType = "Input.setIgnoreInputEvents" 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" EventStorageCacheStorageListUpdated MethodType = "Storage.cacheStorageListUpdated" EventStorageCacheStorageContentUpdated MethodType = "Storage.cacheStorageContentUpdated" EventStorageIndexedDBListUpdated MethodType = "Storage.indexedDBListUpdated" EventStorageIndexedDBContentUpdated MethodType = "Storage.indexedDBContentUpdated" CommandStorageClearDataForOrigin MethodType = "Storage.clearDataForOrigin" CommandStorageGetUsageAndQuota MethodType = "Storage.getUsageAndQuota" CommandStorageTrackCacheStorageForOrigin MethodType = "Storage.trackCacheStorageForOrigin" CommandStorageUntrackCacheStorageForOrigin MethodType = "Storage.untrackCacheStorageForOrigin" CommandStorageTrackIndexedDBForOrigin MethodType = "Storage.trackIndexedDBForOrigin" CommandStorageUntrackIndexedDBForOrigin MethodType = "Storage.untrackIndexedDBForOrigin" 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" CommandBrowserClose MethodType = "Browser.close" CommandBrowserGetWindowForTarget MethodType = "Browser.getWindowForTarget" CommandBrowserGetVersion MethodType = "Browser.getVersion" CommandBrowserSetWindowBounds MethodType = "Browser.setWindowBounds" CommandBrowserGetWindowBounds MethodType = "Browser.getWindowBounds" 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" CommandRuntimeQueryObjects MethodType = "Runtime.queryObjects" CommandRuntimeGlobalLexicalScopeNames MethodType = "Runtime.globalLexicalScopeNames" 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" CommandDebuggerPauseOnAsyncCall MethodType = "Debugger.pauseOnAsyncCall" CommandDebuggerStepOver MethodType = "Debugger.stepOver" CommandDebuggerStepInto MethodType = "Debugger.stepInto" CommandDebuggerStepOut MethodType = "Debugger.stepOut" CommandDebuggerPause MethodType = "Debugger.pause" CommandDebuggerScheduleStepIntoAsync MethodType = "Debugger.scheduleStepIntoAsync" CommandDebuggerResume MethodType = "Debugger.resume" CommandDebuggerGetStackTrace MethodType = "Debugger.getStackTrace" 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" CommandDebuggerSetReturnValue MethodType = "Debugger.setReturnValue" 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" CommandProfilerStartPreciseCoverage MethodType = "Profiler.startPreciseCoverage" CommandProfilerStopPreciseCoverage MethodType = "Profiler.stopPreciseCoverage" CommandProfilerTakePreciseCoverage MethodType = "Profiler.takePreciseCoverage" CommandProfilerGetBestEffortCoverage MethodType = "Profiler.getBestEffortCoverage" CommandProfilerStartTypeProfile MethodType = "Profiler.startTypeProfile" CommandProfilerStopTypeProfile MethodType = "Profiler.stopTypeProfile" CommandProfilerTakeTypeProfile MethodType = "Profiler.takeTypeProfile" 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" CommandHeapProfilerGetSamplingProfile MethodType = "HeapProfiler.getSamplingProfile" ) // 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 CommandMemoryPrepareForLeakDetection: *t = CommandMemoryPrepareForLeakDetection case CommandMemorySetPressureNotificationsSuppressed: *t = CommandMemorySetPressureNotificationsSuppressed case CommandMemorySimulatePressureNotification: *t = CommandMemorySimulatePressureNotification case EventPerformanceMetrics: *t = EventPerformanceMetrics case CommandPerformanceEnable: *t = CommandPerformanceEnable case CommandPerformanceDisable: *t = CommandPerformanceDisable case CommandPerformanceGetMetrics: *t = CommandPerformanceGetMetrics case EventPageDomContentEventFired: *t = EventPageDomContentEventFired case EventPageLoadEventFired: *t = EventPageLoadEventFired case EventPageLifecycleEvent: *t = EventPageLifecycleEvent 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 EventPageInterstitialShown: *t = EventPageInterstitialShown case EventPageInterstitialHidden: *t = EventPageInterstitialHidden case EventPageWindowOpen: *t = EventPageWindowOpen case CommandPageEnable: *t = CommandPageEnable case CommandPageDisable: *t = CommandPageDisable case CommandPageAddScriptToEvaluateOnNewDocument: *t = CommandPageAddScriptToEvaluateOnNewDocument case CommandPageRemoveScriptToEvaluateOnNewDocument: *t = CommandPageRemoveScriptToEvaluateOnNewDocument case CommandPageSetAutoAttachToCreatedPages: *t = CommandPageSetAutoAttachToCreatedPages case CommandPageSetLifecycleEventsEnabled: *t = CommandPageSetLifecycleEventsEnabled case CommandPageReload: *t = CommandPageReload case CommandPageSetAdBlockingEnabled: *t = CommandPageSetAdBlockingEnabled case CommandPageNavigate: *t = CommandPageNavigate case CommandPageStopLoading: *t = CommandPageStopLoading case CommandPageGetNavigationHistory: *t = CommandPageGetNavigationHistory case CommandPageNavigateToHistoryEntry: *t = CommandPageNavigateToHistoryEntry case CommandPageGetResourceTree: *t = CommandPageGetResourceTree case CommandPageGetFrameTree: *t = CommandPageGetFrameTree case CommandPageGetResourceContent: *t = CommandPageGetResourceContent case CommandPageSearchInResource: *t = CommandPageSearchInResource case CommandPageSetDocumentContent: *t = CommandPageSetDocumentContent case CommandPageCaptureScreenshot: *t = CommandPageCaptureScreenshot case CommandPagePrintToPDF: *t = CommandPagePrintToPDF case CommandPageStartScreencast: *t = CommandPageStartScreencast case CommandPageStopScreencast: *t = CommandPageStopScreencast case CommandPageScreencastFrameAck: *t = CommandPageScreencastFrameAck case CommandPageHandleJavaScriptDialog: *t = CommandPageHandleJavaScriptDialog case CommandPageGetAppManifest: *t = CommandPageGetAppManifest case CommandPageRequestAppBanner: *t = CommandPageRequestAppBanner case CommandPageGetLayoutMetrics: *t = CommandPageGetLayoutMetrics case CommandPageCreateIsolatedWorld: *t = CommandPageCreateIsolatedWorld case CommandPageBringToFront: *t = CommandPageBringToFront case CommandPageSetDownloadBehavior: *t = CommandPageSetDownloadBehavior case EventOverlayNodeHighlightRequested: *t = EventOverlayNodeHighlightRequested case EventOverlayInspectNodeRequested: *t = EventOverlayInspectNodeRequested case EventOverlayScreenshotRequested: *t = EventOverlayScreenshotRequested case CommandOverlayEnable: *t = CommandOverlayEnable case CommandOverlayDisable: *t = CommandOverlayDisable case CommandOverlaySetShowPaintRects: *t = CommandOverlaySetShowPaintRects case CommandOverlaySetShowDebugBorders: *t = CommandOverlaySetShowDebugBorders case CommandOverlaySetShowFPSCounter: *t = CommandOverlaySetShowFPSCounter case CommandOverlaySetShowScrollBottleneckRects: *t = CommandOverlaySetShowScrollBottleneckRects case CommandOverlaySetShowViewportSizeOnResize: *t = CommandOverlaySetShowViewportSizeOnResize case CommandOverlaySetPausedInDebuggerMessage: *t = CommandOverlaySetPausedInDebuggerMessage case CommandOverlaySetSuspended: *t = CommandOverlaySetSuspended case CommandOverlaySetInspectMode: *t = CommandOverlaySetInspectMode case CommandOverlayHighlightRect: *t = CommandOverlayHighlightRect case CommandOverlayHighlightQuad: *t = CommandOverlayHighlightQuad case CommandOverlayHighlightNode: *t = CommandOverlayHighlightNode case CommandOverlayHighlightFrame: *t = CommandOverlayHighlightFrame case CommandOverlayHideHighlight: *t = CommandOverlayHideHighlight case CommandOverlayGetHighlightObjectForTest: *t = CommandOverlayGetHighlightObjectForTest case EventEmulationVirtualTimeBudgetExpired: *t = EventEmulationVirtualTimeBudgetExpired case EventEmulationVirtualTimeAdvanced: *t = EventEmulationVirtualTimeAdvanced case EventEmulationVirtualTimePaused: *t = EventEmulationVirtualTimePaused case CommandEmulationSetDeviceMetricsOverride: *t = CommandEmulationSetDeviceMetricsOverride case CommandEmulationClearDeviceMetricsOverride: *t = CommandEmulationClearDeviceMetricsOverride case CommandEmulationResetPageScaleFactor: *t = CommandEmulationResetPageScaleFactor case CommandEmulationSetPageScaleFactor: *t = CommandEmulationSetPageScaleFactor case CommandEmulationSetScriptExecutionDisabled: *t = CommandEmulationSetScriptExecutionDisabled case CommandEmulationSetGeolocationOverride: *t = CommandEmulationSetGeolocationOverride case CommandEmulationClearGeolocationOverride: *t = CommandEmulationClearGeolocationOverride case CommandEmulationSetTouchEmulationEnabled: *t = CommandEmulationSetTouchEmulationEnabled case CommandEmulationSetEmitTouchEventsForMouse: *t = CommandEmulationSetEmitTouchEventsForMouse case CommandEmulationSetEmulatedMedia: *t = CommandEmulationSetEmulatedMedia case CommandEmulationSetCPUThrottlingRate: *t = CommandEmulationSetCPUThrottlingRate case CommandEmulationCanEmulate: *t = CommandEmulationCanEmulate case CommandEmulationSetVirtualTimePolicy: *t = CommandEmulationSetVirtualTimePolicy case CommandEmulationSetNavigatorOverrides: *t = CommandEmulationSetNavigatorOverrides case CommandEmulationSetDefaultBackgroundColorOverride: *t = CommandEmulationSetDefaultBackgroundColorOverride case EventSecuritySecurityStateChanged: *t = EventSecuritySecurityStateChanged case EventSecurityCertificateError: *t = EventSecurityCertificateError case CommandSecurityEnable: *t = CommandSecurityEnable case CommandSecurityDisable: *t = CommandSecurityDisable case CommandSecurityHandleCertificateError: *t = CommandSecurityHandleCertificateError case CommandSecuritySetOverrideCertificateErrors: *t = CommandSecuritySetOverrideCertificateErrors case CommandAuditsGetEncodedResponse: *t = CommandAuditsGetEncodedResponse 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 EventNetworkRequestIntercepted: *t = EventNetworkRequestIntercepted case CommandNetworkEnable: *t = CommandNetworkEnable case CommandNetworkDisable: *t = CommandNetworkDisable case CommandNetworkSetUserAgentOverride: *t = CommandNetworkSetUserAgentOverride case CommandNetworkSearchInResponseBody: *t = CommandNetworkSearchInResponseBody case CommandNetworkSetExtraHTTPHeaders: *t = CommandNetworkSetExtraHTTPHeaders case CommandNetworkGetResponseBody: *t = CommandNetworkGetResponseBody case CommandNetworkSetBlockedURLS: *t = CommandNetworkSetBlockedURLS case CommandNetworkReplayXHR: *t = CommandNetworkReplayXHR case CommandNetworkClearBrowserCache: *t = CommandNetworkClearBrowserCache case CommandNetworkClearBrowserCookies: *t = CommandNetworkClearBrowserCookies case CommandNetworkGetCookies: *t = CommandNetworkGetCookies case CommandNetworkGetAllCookies: *t = CommandNetworkGetAllCookies case CommandNetworkDeleteCookies: *t = CommandNetworkDeleteCookies case CommandNetworkSetCookie: *t = CommandNetworkSetCookie case CommandNetworkSetCookies: *t = CommandNetworkSetCookies case CommandNetworkEmulateNetworkConditions: *t = CommandNetworkEmulateNetworkConditions case CommandNetworkSetCacheDisabled: *t = CommandNetworkSetCacheDisabled case CommandNetworkSetBypassServiceWorker: *t = CommandNetworkSetBypassServiceWorker case CommandNetworkSetDataSizeLimitsForTest: *t = CommandNetworkSetDataSizeLimitsForTest case CommandNetworkGetCertificate: *t = CommandNetworkGetCertificate case CommandNetworkSetRequestInterception: *t = CommandNetworkSetRequestInterception case CommandNetworkContinueInterceptedRequest: *t = CommandNetworkContinueInterceptedRequest case CommandNetworkGetResponseBodyForInterception: *t = CommandNetworkGetResponseBodyForInterception 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 CommandIndexedDBDeleteDatabase: *t = CommandIndexedDBDeleteDatabase case CommandCacheStorageRequestCacheNames: *t = CommandCacheStorageRequestCacheNames case CommandCacheStorageRequestEntries: *t = CommandCacheStorageRequestEntries case CommandCacheStorageDeleteCache: *t = CommandCacheStorageDeleteCache case CommandCacheStorageDeleteEntry: *t = CommandCacheStorageDeleteEntry case CommandCacheStorageRequestCachedResponse: *t = CommandCacheStorageRequestCachedResponse 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 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 CommandDOMEnable: *t = CommandDOMEnable case CommandDOMDisable: *t = CommandDOMDisable case CommandDOMGetDocument: *t = CommandDOMGetDocument case CommandDOMGetFlattenedDocument: *t = CommandDOMGetFlattenedDocument 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 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 CommandDOMDescribeNode: *t = CommandDOMDescribeNode 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 CommandCSSStartRuleUsageTracking: *t = CommandCSSStartRuleUsageTracking case CommandCSSTakeCoverageDelta: *t = CommandCSSTakeCoverageDelta case CommandCSSStopRuleUsageTracking: *t = CommandCSSStopRuleUsageTracking case CommandDOMSnapshotGetSnapshot: *t = CommandDOMSnapshotGetSnapshot case CommandIORead: *t = CommandIORead case CommandIOClose: *t = CommandIOClose case CommandIOResolveBlob: *t = CommandIOResolveBlob 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 EventTargetTargetInfoChanged: *t = EventTargetTargetInfoChanged 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 EventHeadlessExperimentalNeedsBeginFramesChanged: *t = EventHeadlessExperimentalNeedsBeginFramesChanged case EventHeadlessExperimentalMainFrameReadyForScreenshots: *t = EventHeadlessExperimentalMainFrameReadyForScreenshots case CommandHeadlessExperimentalEnable: *t = CommandHeadlessExperimentalEnable case CommandHeadlessExperimentalDisable: *t = CommandHeadlessExperimentalDisable case CommandHeadlessExperimentalBeginFrame: *t = CommandHeadlessExperimentalBeginFrame 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 CommandServiceWorkerStopAllWorkers: *t = CommandServiceWorkerStopAllWorkers case CommandServiceWorkerInspectWorker: *t = CommandServiceWorkerInspectWorker case CommandServiceWorkerSetForceUpdateOnPageLoad: *t = CommandServiceWorkerSetForceUpdateOnPageLoad case CommandServiceWorkerDeliverPushMessage: *t = CommandServiceWorkerDeliverPushMessage case CommandServiceWorkerDispatchSyncEvent: *t = CommandServiceWorkerDispatchSyncEvent case CommandInputSetIgnoreInputEvents: *t = CommandInputSetIgnoreInputEvents 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 EventStorageCacheStorageListUpdated: *t = EventStorageCacheStorageListUpdated case EventStorageCacheStorageContentUpdated: *t = EventStorageCacheStorageContentUpdated case EventStorageIndexedDBListUpdated: *t = EventStorageIndexedDBListUpdated case EventStorageIndexedDBContentUpdated: *t = EventStorageIndexedDBContentUpdated case CommandStorageClearDataForOrigin: *t = CommandStorageClearDataForOrigin case CommandStorageGetUsageAndQuota: *t = CommandStorageGetUsageAndQuota case CommandStorageTrackCacheStorageForOrigin: *t = CommandStorageTrackCacheStorageForOrigin case CommandStorageUntrackCacheStorageForOrigin: *t = CommandStorageUntrackCacheStorageForOrigin case CommandStorageTrackIndexedDBForOrigin: *t = CommandStorageTrackIndexedDBForOrigin case CommandStorageUntrackIndexedDBForOrigin: *t = CommandStorageUntrackIndexedDBForOrigin 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 CommandBrowserClose: *t = CommandBrowserClose case CommandBrowserGetWindowForTarget: *t = CommandBrowserGetWindowForTarget case CommandBrowserGetVersion: *t = CommandBrowserGetVersion case CommandBrowserSetWindowBounds: *t = CommandBrowserSetWindowBounds case CommandBrowserGetWindowBounds: *t = CommandBrowserGetWindowBounds 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 CommandRuntimeQueryObjects: *t = CommandRuntimeQueryObjects case CommandRuntimeGlobalLexicalScopeNames: *t = CommandRuntimeGlobalLexicalScopeNames 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 CommandDebuggerPauseOnAsyncCall: *t = CommandDebuggerPauseOnAsyncCall case CommandDebuggerStepOver: *t = CommandDebuggerStepOver case CommandDebuggerStepInto: *t = CommandDebuggerStepInto case CommandDebuggerStepOut: *t = CommandDebuggerStepOut case CommandDebuggerPause: *t = CommandDebuggerPause case CommandDebuggerScheduleStepIntoAsync: *t = CommandDebuggerScheduleStepIntoAsync case CommandDebuggerResume: *t = CommandDebuggerResume case CommandDebuggerGetStackTrace: *t = CommandDebuggerGetStackTrace 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 CommandDebuggerSetReturnValue: *t = CommandDebuggerSetReturnValue 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 CommandProfilerStartPreciseCoverage: *t = CommandProfilerStartPreciseCoverage case CommandProfilerStopPreciseCoverage: *t = CommandProfilerStopPreciseCoverage case CommandProfilerTakePreciseCoverage: *t = CommandProfilerTakePreciseCoverage case CommandProfilerGetBestEffortCoverage: *t = CommandProfilerGetBestEffortCoverage case CommandProfilerStartTypeProfile: *t = CommandProfilerStartTypeProfile case CommandProfilerStopTypeProfile: *t = CommandProfilerStopTypeProfile case CommandProfilerTakeTypeProfile: *t = CommandProfilerTakeTypeProfile 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 case CommandHeapProfilerGetSamplingProfile: *t = CommandHeapProfilerGetSamplingProfile 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 ( 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 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) } // Handler is the common interface for a Chrome Debugging Protocol target. type Handler interface { // SetActive changes the top level frame id. SetActive(context.Context, FrameID) error // GetRoot returns the root document node for the top level frame. GetRoot(context.Context) (*Node, error) // WaitFrame waits for a frame to be available. WaitFrame(context.Context, FrameID) (*Frame, error) // WaitNode waits for a node to be available. WaitNode(context.Context, *Frame, NodeID) (*Node, error) // Execute executes the specified command using the supplied context and // parameters. Execute(context.Context, MethodType, easyjson.Marshaler, easyjson.Unmarshaler) error // Listen creates a channel that will receive an event for the types // specified. Listen(...MethodType) <-chan interface{} // Release releases a channel returned from Listen. Release(<-chan interface{}) } // 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"` // Frame unique identifier. ParentID FrameID `json:"parentId,omitempty"` // Parent frame identifier. LoaderID LoaderID `json:"loaderId"` // 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"` // Frame document's URL. SecurityOrigin string `json:"securityOrigin"` // Frame document's security origin. MimeType string `json:"mimeType"` // Frame document's mimeType as determined by the browser. UnreachableURL string `json:"unreachableUrl,omitempty"` // If the frame failed to load, this contains the URL that could not be loaded. 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, " ") + "]" } // EmptyFrameID is the "non-existent" frame id. const EmptyFrameID = FrameID("") // LoaderID unique loader identifier. type LoaderID string // String returns the LoaderID as string value. func (t LoaderID) String() string { return string(t) } // TimeSinceEpoch uTC time in seconds, counted from January 1, 1970. type TimeSinceEpoch time.Time // Time returns the TimeSinceEpoch as time.Time value. func (t TimeSinceEpoch) Time() time.Time { return time.Time(t) } // MarshalEasyJSON satisfies easyjson.Marshaler. func (t TimeSinceEpoch) MarshalEasyJSON(out *jwriter.Writer) { v := float64(time.Time(t).UnixNano() / int64(time.Second)) out.Buffer.EnsureSpace(20) out.Buffer.Buf = strconv.AppendFloat(out.Buffer.Buf, v, 'f', -1, 64) } // MarshalJSON satisfies json.Marshaler. func (t TimeSinceEpoch) MarshalJSON() ([]byte, error) { return easyjson.Marshal(t) } // UnmarshalEasyJSON satisfies easyjson.Unmarshaler. func (t *TimeSinceEpoch) UnmarshalEasyJSON(in *jlexer.Lexer) { *t = TimeSinceEpoch(time.Unix(0, int64(in.Float64()*float64(time.Second)))) } // UnmarshalJSON satisfies json.Unmarshaler. func (t *TimeSinceEpoch) UnmarshalJSON(buf []byte) error { return easyjson.Unmarshal(buf, t) } // MonotonicTime monotonically increasing time in seconds since an arbitrary // point in the past. type MonotonicTime time.Time // Time returns the MonotonicTime as time.Time value. func (t MonotonicTime) Time() time.Time { return time.Time(t) } // MonotonicTimeEpoch is the MonotonicTime time epoch. var MonotonicTimeEpoch *time.Time func init() { // initialize epoch bt := sysutil.BootTime() MonotonicTimeEpoch = &bt } // MarshalEasyJSON satisfies easyjson.Marshaler. func (t MonotonicTime) MarshalEasyJSON(out *jwriter.Writer) { v := float64(time.Time(t).Sub(*MonotonicTimeEpoch)) / float64(time.Second) out.Buffer.EnsureSpace(20) out.Buffer.Buf = strconv.AppendFloat(out.Buffer.Buf, v, 'f', -1, 64) } // MarshalJSON satisfies json.Marshaler. func (t MonotonicTime) MarshalJSON() ([]byte, error) { return easyjson.Marshal(t) } // UnmarshalEasyJSON satisfies easyjson.Unmarshaler. func (t *MonotonicTime) UnmarshalEasyJSON(in *jlexer.Lexer) { *t = MonotonicTime(MonotonicTimeEpoch.Add(time.Duration(in.Float64() * float64(time.Second)))) } // UnmarshalJSON satisfies json.Unmarshaler. func (t *MonotonicTime) 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"` // Node's nodeType. NodeName string `json:"nodeName"` // Node's nodeName. BackendNodeID BackendNodeID `json:"backendNodeId"` } // 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"` // 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. ParentID NodeID `json:"parentId,omitempty"` // The id of the parent node if any. BackendNodeID BackendNodeID `json:"backendNodeId"` // The BackendNodeId for this node. NodeType NodeType `json:"nodeType"` // Node's nodeType. NodeName string `json:"nodeName"` // Node's nodeName. LocalName string `json:"localName"` // Node's localName. NodeValue string `json:"nodeValue"` // 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(stopAtDocument, stopAtID bool) string { n.RLock() defer n.RUnlock() p := "" pos := "" id := n.AttributeValue("id") switch { case n.Parent == nil: return n.LocalName case stopAtDocument && n.NodeType == NodeTypeDocument: return "" case stopAtID && id != "": p = "/" pos = `[@id='` + id + `']` case n.Parent != nil: var i int var found bool n.Parent.RLock() 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 } } n.Parent.RUnlock() if found { pos = "[" + strconv.Itoa(i) + "]" } p = n.Parent.xpath(stopAtDocument, stopAtID) } return p + "/" + n.LocalName + pos } // PartialXPathByID returns the partial XPath for the node, stopping at the // first parent with an id attribute or at nearest parent document node. func (n *Node) PartialXPathByID() string { return n.xpath(true, true) } // PartialXPath returns the partial XPath for the node, stopping at the nearest // parent document node. func (n *Node) PartialXPath() string { return n.xpath(true, false) } // FullXPathByID returns the full XPath for the node, stopping at the top most // document root or at the closest parent node with an id attribute. func (n *Node) FullXPathByID() string { return n.xpath(false, true) } // FullXPath returns the full XPath for the node, stopping only at the top most // document root. func (n *Node) FullXPath() string { return n.xpath(false, 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, " ") + "]" } // EmptyNodeID is the "non-existent" node id. const EmptyNodeID = NodeID(0) // RGBA a structure holding an RGBA color. type RGBA struct { R int64 `json:"r"` // The red component, in the [0-255] range. G int64 `json:"g"` // The green component, in the [0-255] range. B int64 `json:"b"` // 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) }