diff --git a/bindings/_tools/generate/mod.ts b/bindings/_tools/generate/mod.ts index a04993d..3781e11 100644 --- a/bindings/_tools/generate/mod.ts +++ b/bindings/_tools/generate/mod.ts @@ -142,7 +142,7 @@ function generateParameters(commandParams: CommandParameter[], domain: string) { let events = ""; let eventMap = "const CelestialEvents = {\n"; -let eventMapType = "\ninterface CelestialEventMap {"; +let eventMapType = "\nexport interface CelestialEventMap {"; let celestial = ` export class Celestial extends EventTarget { @@ -240,11 +240,11 @@ for (const domain of protocol.domains) { for (const event of domain.events || []) { if (event.parameters) { events += ` - interface ${domain.domain}_${event.name} { + export interface ${domain.domain}_${event.name} { ${generateParameters(event.parameters, domain.domain)} } - class ${domain.domain}_${event.name}Event extends CustomEvent<${domain.domain}_${event.name}> { + export class ${domain.domain}_${event.name}Event extends CustomEvent<${domain.domain}_${event.name}> { constructor(detail: ${domain.domain}_${event.name}) { super("${domain.domain}.${event.name}", { detail }) } diff --git a/bindings/celestial.ts b/bindings/celestial.ts index 6418bbd..c473f5b 100644 --- a/bindings/celestial.ts +++ b/bindings/celestial.ts @@ -1,5 +1,5 @@ // These bindings are auto-generated by ./_tools/generate/mod.ts -// Last generated at 2023-08-17T16:20:45.007Z +// Last generated at 2023-09-11T05:12:55.953Z // deno-lint-ignore-file no-explicit-any export const PROTOCOL_VERSION = "1.3"; @@ -9118,110 +9118,110 @@ export type Schema_Domain = { version: string; }; -interface Accessibility_loadComplete { +export interface Accessibility_loadComplete { /** * New document root node. */ root: Accessibility_AXNode; } -class Accessibility_loadCompleteEvent +export class Accessibility_loadCompleteEvent extends CustomEvent { constructor(detail: Accessibility_loadComplete) { super("Accessibility.loadComplete", { detail }); } } -interface Accessibility_nodesUpdated { +export interface Accessibility_nodesUpdated { /** * Updated node data. */ nodes: Accessibility_AXNode[]; } -class Accessibility_nodesUpdatedEvent +export class Accessibility_nodesUpdatedEvent extends CustomEvent { constructor(detail: Accessibility_nodesUpdated) { super("Accessibility.nodesUpdated", { detail }); } } -interface Animation_animationCanceled { +export interface Animation_animationCanceled { /** * Id of the animation that was cancelled. */ id: string; } -class Animation_animationCanceledEvent +export class Animation_animationCanceledEvent extends CustomEvent { constructor(detail: Animation_animationCanceled) { super("Animation.animationCanceled", { detail }); } } -interface Animation_animationCreated { +export interface Animation_animationCreated { /** * Id of the animation that was created. */ id: string; } -class Animation_animationCreatedEvent +export class Animation_animationCreatedEvent extends CustomEvent { constructor(detail: Animation_animationCreated) { super("Animation.animationCreated", { detail }); } } -interface Animation_animationStarted { +export interface Animation_animationStarted { /** * Animation that was started. */ animation: Animation_Animation; } -class Animation_animationStartedEvent +export class Animation_animationStartedEvent extends CustomEvent { constructor(detail: Animation_animationStarted) { super("Animation.animationStarted", { detail }); } } -interface Audits_issueAdded { +export interface Audits_issueAdded { issue: Audits_InspectorIssue; } -class Audits_issueAddedEvent extends CustomEvent { +export class Audits_issueAddedEvent extends CustomEvent { constructor(detail: Audits_issueAdded) { super("Audits.issueAdded", { detail }); } } -interface BackgroundService_recordingStateChanged { +export interface BackgroundService_recordingStateChanged { isRecording: boolean; service: BackgroundService_ServiceName; } -class BackgroundService_recordingStateChangedEvent +export class BackgroundService_recordingStateChangedEvent extends CustomEvent { constructor(detail: BackgroundService_recordingStateChanged) { super("BackgroundService.recordingStateChanged", { detail }); } } -interface BackgroundService_backgroundServiceEventReceived { +export interface BackgroundService_backgroundServiceEventReceived { backgroundServiceEvent: BackgroundService_BackgroundServiceEvent; } -class BackgroundService_backgroundServiceEventReceivedEvent +export class BackgroundService_backgroundServiceEventReceivedEvent extends CustomEvent { constructor(detail: BackgroundService_backgroundServiceEventReceived) { super("BackgroundService.backgroundServiceEventReceived", { detail }); } } -interface Browser_downloadWillBegin { +export interface Browser_downloadWillBegin { /** * Id of the frame that caused the download to begin. */ @@ -9240,14 +9240,14 @@ interface Browser_downloadWillBegin { suggestedFilename: string; } -class Browser_downloadWillBeginEvent +export class Browser_downloadWillBeginEvent extends CustomEvent { constructor(detail: Browser_downloadWillBegin) { super("Browser.downloadWillBegin", { detail }); } } -interface Browser_downloadProgress { +export interface Browser_downloadProgress { /** * Global unique identifier of the download. */ @@ -9266,83 +9266,85 @@ interface Browser_downloadProgress { state: "inProgress" | "completed" | "canceled"; } -class Browser_downloadProgressEvent +export class Browser_downloadProgressEvent extends CustomEvent { constructor(detail: Browser_downloadProgress) { super("Browser.downloadProgress", { detail }); } } -interface CSS_fontsUpdated { +export interface CSS_fontsUpdated { /** * The web font that has loaded. */ font?: CSS_FontFace; } -class CSS_fontsUpdatedEvent extends CustomEvent { +export class CSS_fontsUpdatedEvent extends CustomEvent { constructor(detail: CSS_fontsUpdated) { super("CSS.fontsUpdated", { detail }); } } -interface CSS_styleSheetAdded { +export interface CSS_styleSheetAdded { /** * Added stylesheet metainfo. */ header: CSS_CSSStyleSheetHeader; } -class CSS_styleSheetAddedEvent extends CustomEvent { +export class CSS_styleSheetAddedEvent extends CustomEvent { constructor(detail: CSS_styleSheetAdded) { super("CSS.styleSheetAdded", { detail }); } } -interface CSS_styleSheetChanged { +export interface CSS_styleSheetChanged { styleSheetId: CSS_StyleSheetId; } -class CSS_styleSheetChangedEvent extends CustomEvent { +export class CSS_styleSheetChangedEvent + extends CustomEvent { constructor(detail: CSS_styleSheetChanged) { super("CSS.styleSheetChanged", { detail }); } } -interface CSS_styleSheetRemoved { +export interface CSS_styleSheetRemoved { /** * Identifier of the removed stylesheet. */ styleSheetId: CSS_StyleSheetId; } -class CSS_styleSheetRemovedEvent extends CustomEvent { +export class CSS_styleSheetRemovedEvent + extends CustomEvent { constructor(detail: CSS_styleSheetRemoved) { super("CSS.styleSheetRemoved", { detail }); } } -interface Cast_sinksUpdated { +export interface Cast_sinksUpdated { sinks: Cast_Sink[]; } -class Cast_sinksUpdatedEvent extends CustomEvent { +export class Cast_sinksUpdatedEvent extends CustomEvent { constructor(detail: Cast_sinksUpdated) { super("Cast.sinksUpdated", { detail }); } } -interface Cast_issueUpdated { +export interface Cast_issueUpdated { issueMessage: string; } -class Cast_issueUpdatedEvent extends CustomEvent { +export class Cast_issueUpdatedEvent extends CustomEvent { constructor(detail: Cast_issueUpdated) { super("Cast.issueUpdated", { detail }); } } -interface DOM_attributeModified { +export interface DOM_attributeModified { /** * Id of the node that has changed. */ @@ -9357,13 +9359,14 @@ interface DOM_attributeModified { value: string; } -class DOM_attributeModifiedEvent extends CustomEvent { +export class DOM_attributeModifiedEvent + extends CustomEvent { constructor(detail: DOM_attributeModified) { super("DOM.attributeModified", { detail }); } } -interface DOM_attributeRemoved { +export interface DOM_attributeRemoved { /** * Id of the node that has changed. */ @@ -9374,13 +9377,14 @@ interface DOM_attributeRemoved { name: string; } -class DOM_attributeRemovedEvent extends CustomEvent { +export class DOM_attributeRemovedEvent + extends CustomEvent { constructor(detail: DOM_attributeRemoved) { super("DOM.attributeRemoved", { detail }); } } -interface DOM_characterDataModified { +export interface DOM_characterDataModified { /** * Id of the node that has changed. */ @@ -9391,14 +9395,14 @@ interface DOM_characterDataModified { characterData: string; } -class DOM_characterDataModifiedEvent +export class DOM_characterDataModifiedEvent extends CustomEvent { constructor(detail: DOM_characterDataModified) { super("DOM.characterDataModified", { detail }); } } -interface DOM_childNodeCountUpdated { +export interface DOM_childNodeCountUpdated { /** * Id of the node that has changed. */ @@ -9409,14 +9413,14 @@ interface DOM_childNodeCountUpdated { childNodeCount: number; } -class DOM_childNodeCountUpdatedEvent +export class DOM_childNodeCountUpdatedEvent extends CustomEvent { constructor(detail: DOM_childNodeCountUpdated) { super("DOM.childNodeCountUpdated", { detail }); } } -interface DOM_childNodeInserted { +export interface DOM_childNodeInserted { /** * Id of the node that has changed. */ @@ -9431,13 +9435,14 @@ interface DOM_childNodeInserted { node: DOM_Node; } -class DOM_childNodeInsertedEvent extends CustomEvent { +export class DOM_childNodeInsertedEvent + extends CustomEvent { constructor(detail: DOM_childNodeInserted) { super("DOM.childNodeInserted", { detail }); } } -interface DOM_childNodeRemoved { +export interface DOM_childNodeRemoved { /** * Parent id. */ @@ -9448,13 +9453,14 @@ interface DOM_childNodeRemoved { nodeId: DOM_NodeId; } -class DOM_childNodeRemovedEvent extends CustomEvent { +export class DOM_childNodeRemovedEvent + extends CustomEvent { constructor(detail: DOM_childNodeRemoved) { super("DOM.childNodeRemoved", { detail }); } } -interface DOM_distributedNodesUpdated { +export interface DOM_distributedNodesUpdated { /** * Insertion point where distributed nodes were updated. */ @@ -9465,28 +9471,28 @@ interface DOM_distributedNodesUpdated { distributedNodes: DOM_BackendNode[]; } -class DOM_distributedNodesUpdatedEvent +export class DOM_distributedNodesUpdatedEvent extends CustomEvent { constructor(detail: DOM_distributedNodesUpdated) { super("DOM.distributedNodesUpdated", { detail }); } } -interface DOM_inlineStyleInvalidated { +export interface DOM_inlineStyleInvalidated { /** * Ids of the nodes for which the inline styles have been invalidated. */ nodeIds: DOM_NodeId[]; } -class DOM_inlineStyleInvalidatedEvent +export class DOM_inlineStyleInvalidatedEvent extends CustomEvent { constructor(detail: DOM_inlineStyleInvalidated) { super("DOM.inlineStyleInvalidated", { detail }); } } -interface DOM_pseudoElementAdded { +export interface DOM_pseudoElementAdded { /** * Pseudo element's parent element id. */ @@ -9497,13 +9503,14 @@ interface DOM_pseudoElementAdded { pseudoElement: DOM_Node; } -class DOM_pseudoElementAddedEvent extends CustomEvent { +export class DOM_pseudoElementAddedEvent + extends CustomEvent { constructor(detail: DOM_pseudoElementAdded) { super("DOM.pseudoElementAdded", { detail }); } } -interface DOM_pseudoElementRemoved { +export interface DOM_pseudoElementRemoved { /** * Pseudo element's parent element id. */ @@ -9514,14 +9521,14 @@ interface DOM_pseudoElementRemoved { pseudoElementId: DOM_NodeId; } -class DOM_pseudoElementRemovedEvent +export class DOM_pseudoElementRemovedEvent extends CustomEvent { constructor(detail: DOM_pseudoElementRemoved) { super("DOM.pseudoElementRemoved", { detail }); } } -interface DOM_setChildNodes { +export interface DOM_setChildNodes { /** * Parent node id to populate with children. */ @@ -9532,13 +9539,13 @@ interface DOM_setChildNodes { nodes: DOM_Node[]; } -class DOM_setChildNodesEvent extends CustomEvent { +export class DOM_setChildNodesEvent extends CustomEvent { constructor(detail: DOM_setChildNodes) { super("DOM.setChildNodes", { detail }); } } -interface DOM_shadowRootPopped { +export interface DOM_shadowRootPopped { /** * Host element id. */ @@ -9549,13 +9556,14 @@ interface DOM_shadowRootPopped { rootId: DOM_NodeId; } -class DOM_shadowRootPoppedEvent extends CustomEvent { +export class DOM_shadowRootPoppedEvent + extends CustomEvent { constructor(detail: DOM_shadowRootPopped) { super("DOM.shadowRootPopped", { detail }); } } -interface DOM_shadowRootPushed { +export interface DOM_shadowRootPushed { /** * Host element id. */ @@ -9566,96 +9574,99 @@ interface DOM_shadowRootPushed { root: DOM_Node; } -class DOM_shadowRootPushedEvent extends CustomEvent { +export class DOM_shadowRootPushedEvent + extends CustomEvent { constructor(detail: DOM_shadowRootPushed) { super("DOM.shadowRootPushed", { detail }); } } -interface DOMStorage_domStorageItemAdded { +export interface DOMStorage_domStorageItemAdded { storageId: DOMStorage_StorageId; key: string; newValue: string; } -class DOMStorage_domStorageItemAddedEvent +export class DOMStorage_domStorageItemAddedEvent extends CustomEvent { constructor(detail: DOMStorage_domStorageItemAdded) { super("DOMStorage.domStorageItemAdded", { detail }); } } -interface DOMStorage_domStorageItemRemoved { +export interface DOMStorage_domStorageItemRemoved { storageId: DOMStorage_StorageId; key: string; } -class DOMStorage_domStorageItemRemovedEvent +export class DOMStorage_domStorageItemRemovedEvent extends CustomEvent { constructor(detail: DOMStorage_domStorageItemRemoved) { super("DOMStorage.domStorageItemRemoved", { detail }); } } -interface DOMStorage_domStorageItemUpdated { +export interface DOMStorage_domStorageItemUpdated { storageId: DOMStorage_StorageId; key: string; oldValue: string; newValue: string; } -class DOMStorage_domStorageItemUpdatedEvent +export class DOMStorage_domStorageItemUpdatedEvent extends CustomEvent { constructor(detail: DOMStorage_domStorageItemUpdated) { super("DOMStorage.domStorageItemUpdated", { detail }); } } -interface DOMStorage_domStorageItemsCleared { +export interface DOMStorage_domStorageItemsCleared { storageId: DOMStorage_StorageId; } -class DOMStorage_domStorageItemsClearedEvent +export class DOMStorage_domStorageItemsClearedEvent extends CustomEvent { constructor(detail: DOMStorage_domStorageItemsCleared) { super("DOMStorage.domStorageItemsCleared", { detail }); } } -interface Database_addDatabase { +export interface Database_addDatabase { database: Database_Database; } -class Database_addDatabaseEvent extends CustomEvent { +export class Database_addDatabaseEvent + extends CustomEvent { constructor(detail: Database_addDatabase) { super("Database.addDatabase", { detail }); } } -interface Input_dragIntercepted { +export interface Input_dragIntercepted { data: Input_DragData; } -class Input_dragInterceptedEvent extends CustomEvent { +export class Input_dragInterceptedEvent + extends CustomEvent { constructor(detail: Input_dragIntercepted) { super("Input.dragIntercepted", { detail }); } } -interface Inspector_detached { +export interface Inspector_detached { /** * The reason why connection has been terminated. */ reason: string; } -class Inspector_detachedEvent extends CustomEvent { +export class Inspector_detachedEvent extends CustomEvent { constructor(detail: Inspector_detached) { super("Inspector.detached", { detail }); } } -interface LayerTree_layerPainted { +export interface LayerTree_layerPainted { /** * The id of the painted layer. */ @@ -9666,40 +9677,41 @@ interface LayerTree_layerPainted { clip: DOM_Rect; } -class LayerTree_layerPaintedEvent extends CustomEvent { +export class LayerTree_layerPaintedEvent + extends CustomEvent { constructor(detail: LayerTree_layerPainted) { super("LayerTree.layerPainted", { detail }); } } -interface LayerTree_layerTreeDidChange { +export interface LayerTree_layerTreeDidChange { /** * Layer tree, absent if not in the comspositing mode. */ layers?: LayerTree_Layer[]; } -class LayerTree_layerTreeDidChangeEvent +export class LayerTree_layerTreeDidChangeEvent extends CustomEvent { constructor(detail: LayerTree_layerTreeDidChange) { super("LayerTree.layerTreeDidChange", { detail }); } } -interface Log_entryAdded { +export interface Log_entryAdded { /** * The entry. */ entry: Log_LogEntry; } -class Log_entryAddedEvent extends CustomEvent { +export class Log_entryAddedEvent extends CustomEvent { constructor(detail: Log_entryAdded) { super("Log.entryAdded", { detail }); } } -interface Network_dataReceived { +export interface Network_dataReceived { /** * Request identifier. */ @@ -9718,13 +9730,14 @@ interface Network_dataReceived { encodedDataLength: number; } -class Network_dataReceivedEvent extends CustomEvent { +export class Network_dataReceivedEvent + extends CustomEvent { constructor(detail: Network_dataReceived) { super("Network.dataReceived", { detail }); } } -interface Network_eventSourceMessageReceived { +export interface Network_eventSourceMessageReceived { /** * Request identifier. */ @@ -9747,14 +9760,14 @@ interface Network_eventSourceMessageReceived { data: string; } -class Network_eventSourceMessageReceivedEvent +export class Network_eventSourceMessageReceivedEvent extends CustomEvent { constructor(detail: Network_eventSourceMessageReceived) { super("Network.eventSourceMessageReceived", { detail }); } } -interface Network_loadingFailed { +export interface Network_loadingFailed { /** * Request identifier. */ @@ -9785,13 +9798,14 @@ interface Network_loadingFailed { corsErrorStatus?: Network_CorsErrorStatus; } -class Network_loadingFailedEvent extends CustomEvent { +export class Network_loadingFailedEvent + extends CustomEvent { constructor(detail: Network_loadingFailed) { super("Network.loadingFailed", { detail }); } } -interface Network_loadingFinished { +export interface Network_loadingFinished { /** * Request identifier. */ @@ -9806,14 +9820,14 @@ interface Network_loadingFinished { encodedDataLength: number; } -class Network_loadingFinishedEvent +export class Network_loadingFinishedEvent extends CustomEvent { constructor(detail: Network_loadingFinished) { super("Network.loadingFinished", { detail }); } } -interface Network_requestIntercepted { +export interface Network_requestIntercepted { /** * Each request the page makes will have a unique id, however if any redirects are encountered * while processing that fetch, they will be reported with the same id as the original fetch. @@ -9869,28 +9883,28 @@ interface Network_requestIntercepted { requestId?: Network_RequestId; } -class Network_requestInterceptedEvent +export class Network_requestInterceptedEvent extends CustomEvent { constructor(detail: Network_requestIntercepted) { super("Network.requestIntercepted", { detail }); } } -interface Network_requestServedFromCache { +export interface Network_requestServedFromCache { /** * Request identifier. */ requestId: Network_RequestId; } -class Network_requestServedFromCacheEvent +export class Network_requestServedFromCacheEvent extends CustomEvent { constructor(detail: Network_requestServedFromCache) { super("Network.requestServedFromCache", { detail }); } } -interface Network_requestWillBeSent { +export interface Network_requestWillBeSent { /** * Request identifier. */ @@ -9944,14 +9958,14 @@ interface Network_requestWillBeSent { hasUserGesture?: boolean; } -class Network_requestWillBeSentEvent +export class Network_requestWillBeSentEvent extends CustomEvent { constructor(detail: Network_requestWillBeSent) { super("Network.requestWillBeSent", { detail }); } } -interface Network_resourceChangedPriority { +export interface Network_resourceChangedPriority { /** * Request identifier. */ @@ -9966,14 +9980,14 @@ interface Network_resourceChangedPriority { timestamp: Network_MonotonicTime; } -class Network_resourceChangedPriorityEvent +export class Network_resourceChangedPriorityEvent extends CustomEvent { constructor(detail: Network_resourceChangedPriority) { super("Network.resourceChangedPriority", { detail }); } } -interface Network_signedExchangeReceived { +export interface Network_signedExchangeReceived { /** * Request identifier. */ @@ -9984,14 +9998,14 @@ interface Network_signedExchangeReceived { info: Network_SignedExchangeInfo; } -class Network_signedExchangeReceivedEvent +export class Network_signedExchangeReceivedEvent extends CustomEvent { constructor(detail: Network_signedExchangeReceived) { super("Network.signedExchangeReceived", { detail }); } } -interface Network_responseReceived { +export interface Network_responseReceived { /** * Request identifier. */ @@ -10024,14 +10038,14 @@ interface Network_responseReceived { frameId?: Page_FrameId; } -class Network_responseReceivedEvent +export class Network_responseReceivedEvent extends CustomEvent { constructor(detail: Network_responseReceived) { super("Network.responseReceived", { detail }); } } -interface Network_webSocketClosed { +export interface Network_webSocketClosed { /** * Request identifier. */ @@ -10042,14 +10056,14 @@ interface Network_webSocketClosed { timestamp: Network_MonotonicTime; } -class Network_webSocketClosedEvent +export class Network_webSocketClosedEvent extends CustomEvent { constructor(detail: Network_webSocketClosed) { super("Network.webSocketClosed", { detail }); } } -interface Network_webSocketCreated { +export interface Network_webSocketCreated { /** * Request identifier. */ @@ -10064,14 +10078,14 @@ interface Network_webSocketCreated { initiator?: Network_Initiator; } -class Network_webSocketCreatedEvent +export class Network_webSocketCreatedEvent extends CustomEvent { constructor(detail: Network_webSocketCreated) { super("Network.webSocketCreated", { detail }); } } -interface Network_webSocketFrameError { +export interface Network_webSocketFrameError { /** * Request identifier. */ @@ -10086,14 +10100,14 @@ interface Network_webSocketFrameError { errorMessage: string; } -class Network_webSocketFrameErrorEvent +export class Network_webSocketFrameErrorEvent extends CustomEvent { constructor(detail: Network_webSocketFrameError) { super("Network.webSocketFrameError", { detail }); } } -interface Network_webSocketFrameReceived { +export interface Network_webSocketFrameReceived { /** * Request identifier. */ @@ -10108,14 +10122,14 @@ interface Network_webSocketFrameReceived { response: Network_WebSocketFrame; } -class Network_webSocketFrameReceivedEvent +export class Network_webSocketFrameReceivedEvent extends CustomEvent { constructor(detail: Network_webSocketFrameReceived) { super("Network.webSocketFrameReceived", { detail }); } } -interface Network_webSocketFrameSent { +export interface Network_webSocketFrameSent { /** * Request identifier. */ @@ -10130,14 +10144,14 @@ interface Network_webSocketFrameSent { response: Network_WebSocketFrame; } -class Network_webSocketFrameSentEvent +export class Network_webSocketFrameSentEvent extends CustomEvent { constructor(detail: Network_webSocketFrameSent) { super("Network.webSocketFrameSent", { detail }); } } -interface Network_webSocketHandshakeResponseReceived { +export interface Network_webSocketHandshakeResponseReceived { /** * Request identifier. */ @@ -10152,14 +10166,14 @@ interface Network_webSocketHandshakeResponseReceived { response: Network_WebSocketResponse; } -class Network_webSocketHandshakeResponseReceivedEvent +export class Network_webSocketHandshakeResponseReceivedEvent extends CustomEvent { constructor(detail: Network_webSocketHandshakeResponseReceived) { super("Network.webSocketHandshakeResponseReceived", { detail }); } } -interface Network_webSocketWillSendHandshakeRequest { +export interface Network_webSocketWillSendHandshakeRequest { /** * Request identifier. */ @@ -10178,14 +10192,14 @@ interface Network_webSocketWillSendHandshakeRequest { request: Network_WebSocketRequest; } -class Network_webSocketWillSendHandshakeRequestEvent +export class Network_webSocketWillSendHandshakeRequestEvent extends CustomEvent { constructor(detail: Network_webSocketWillSendHandshakeRequest) { super("Network.webSocketWillSendHandshakeRequest", { detail }); } } -interface Network_webTransportCreated { +export interface Network_webTransportCreated { /** * WebTransport identifier. */ @@ -10204,14 +10218,14 @@ interface Network_webTransportCreated { initiator?: Network_Initiator; } -class Network_webTransportCreatedEvent +export class Network_webTransportCreatedEvent extends CustomEvent { constructor(detail: Network_webTransportCreated) { super("Network.webTransportCreated", { detail }); } } -interface Network_webTransportConnectionEstablished { +export interface Network_webTransportConnectionEstablished { /** * WebTransport identifier. */ @@ -10222,14 +10236,14 @@ interface Network_webTransportConnectionEstablished { timestamp: Network_MonotonicTime; } -class Network_webTransportConnectionEstablishedEvent +export class Network_webTransportConnectionEstablishedEvent extends CustomEvent { constructor(detail: Network_webTransportConnectionEstablished) { super("Network.webTransportConnectionEstablished", { detail }); } } -interface Network_webTransportClosed { +export interface Network_webTransportClosed { /** * WebTransport identifier. */ @@ -10240,14 +10254,14 @@ interface Network_webTransportClosed { timestamp: Network_MonotonicTime; } -class Network_webTransportClosedEvent +export class Network_webTransportClosedEvent extends CustomEvent { constructor(detail: Network_webTransportClosed) { super("Network.webTransportClosed", { detail }); } } -interface Network_requestWillBeSentExtraInfo { +export interface Network_requestWillBeSentExtraInfo { /** * Request identifier. Used to match this information to an existing requestWillBeSent event. */ @@ -10276,14 +10290,14 @@ interface Network_requestWillBeSentExtraInfo { siteHasCookieInOtherPartition?: boolean; } -class Network_requestWillBeSentExtraInfoEvent +export class Network_requestWillBeSentExtraInfoEvent extends CustomEvent { constructor(detail: Network_requestWillBeSentExtraInfo) { super("Network.requestWillBeSentExtraInfo", { detail }); } } -interface Network_responseReceivedExtraInfo { +export interface Network_responseReceivedExtraInfo { /** * Request identifier. Used to match this information to another responseReceived event. */ @@ -10325,14 +10339,14 @@ interface Network_responseReceivedExtraInfo { cookiePartitionKeyOpaque?: boolean; } -class Network_responseReceivedExtraInfoEvent +export class Network_responseReceivedExtraInfoEvent extends CustomEvent { constructor(detail: Network_responseReceivedExtraInfo) { super("Network.responseReceivedExtraInfo", { detail }); } } -interface Network_trustTokenOperationDone { +export interface Network_trustTokenOperationDone { /** * Detailed success or error status of the operation. * 'AlreadyExists' also signifies a successful operation, as the result @@ -10368,14 +10382,14 @@ interface Network_trustTokenOperationDone { issuedTokenCount?: number; } -class Network_trustTokenOperationDoneEvent +export class Network_trustTokenOperationDoneEvent extends CustomEvent { constructor(detail: Network_trustTokenOperationDone) { super("Network.trustTokenOperationDone", { detail }); } } -interface Network_subresourceWebBundleMetadataReceived { +export interface Network_subresourceWebBundleMetadataReceived { /** * Request identifier. Used to match this information to another event. */ @@ -10386,14 +10400,14 @@ interface Network_subresourceWebBundleMetadataReceived { urls: string[]; } -class Network_subresourceWebBundleMetadataReceivedEvent +export class Network_subresourceWebBundleMetadataReceivedEvent extends CustomEvent { constructor(detail: Network_subresourceWebBundleMetadataReceived) { super("Network.subresourceWebBundleMetadataReceived", { detail }); } } -interface Network_subresourceWebBundleMetadataError { +export interface Network_subresourceWebBundleMetadataError { /** * Request identifier. Used to match this information to another event. */ @@ -10404,14 +10418,14 @@ interface Network_subresourceWebBundleMetadataError { errorMessage: string; } -class Network_subresourceWebBundleMetadataErrorEvent +export class Network_subresourceWebBundleMetadataErrorEvent extends CustomEvent { constructor(detail: Network_subresourceWebBundleMetadataError) { super("Network.subresourceWebBundleMetadataError", { detail }); } } -interface Network_subresourceWebBundleInnerResponseParsed { +export interface Network_subresourceWebBundleInnerResponseParsed { /** * Request identifier of the subresource request */ @@ -10428,14 +10442,14 @@ interface Network_subresourceWebBundleInnerResponseParsed { bundleRequestId?: Network_RequestId; } -class Network_subresourceWebBundleInnerResponseParsedEvent +export class Network_subresourceWebBundleInnerResponseParsedEvent extends CustomEvent { constructor(detail: Network_subresourceWebBundleInnerResponseParsed) { super("Network.subresourceWebBundleInnerResponseParsed", { detail }); } } -interface Network_subresourceWebBundleInnerResponseError { +export interface Network_subresourceWebBundleInnerResponseError { /** * Request identifier of the subresource request */ @@ -10456,36 +10470,36 @@ interface Network_subresourceWebBundleInnerResponseError { bundleRequestId?: Network_RequestId; } -class Network_subresourceWebBundleInnerResponseErrorEvent +export class Network_subresourceWebBundleInnerResponseErrorEvent extends CustomEvent { constructor(detail: Network_subresourceWebBundleInnerResponseError) { super("Network.subresourceWebBundleInnerResponseError", { detail }); } } -interface Network_reportingApiReportAdded { +export interface Network_reportingApiReportAdded { report: Network_ReportingApiReport; } -class Network_reportingApiReportAddedEvent +export class Network_reportingApiReportAddedEvent extends CustomEvent { constructor(detail: Network_reportingApiReportAdded) { super("Network.reportingApiReportAdded", { detail }); } } -interface Network_reportingApiReportUpdated { +export interface Network_reportingApiReportUpdated { report: Network_ReportingApiReport; } -class Network_reportingApiReportUpdatedEvent +export class Network_reportingApiReportUpdatedEvent extends CustomEvent { constructor(detail: Network_reportingApiReportUpdated) { super("Network.reportingApiReportUpdated", { detail }); } } -interface Network_reportingApiEndpointsChangedForOrigin { +export interface Network_reportingApiEndpointsChangedForOrigin { /** * Origin of the document(s) which configured the endpoints. */ @@ -10493,64 +10507,64 @@ interface Network_reportingApiEndpointsChangedForOrigin { endpoints: Network_ReportingApiEndpoint[]; } -class Network_reportingApiEndpointsChangedForOriginEvent +export class Network_reportingApiEndpointsChangedForOriginEvent extends CustomEvent { constructor(detail: Network_reportingApiEndpointsChangedForOrigin) { super("Network.reportingApiEndpointsChangedForOrigin", { detail }); } } -interface Overlay_inspectNodeRequested { +export interface Overlay_inspectNodeRequested { /** * Id of the node to inspect. */ backendNodeId: DOM_BackendNodeId; } -class Overlay_inspectNodeRequestedEvent +export class Overlay_inspectNodeRequestedEvent extends CustomEvent { constructor(detail: Overlay_inspectNodeRequested) { super("Overlay.inspectNodeRequested", { detail }); } } -interface Overlay_nodeHighlightRequested { +export interface Overlay_nodeHighlightRequested { nodeId: DOM_NodeId; } -class Overlay_nodeHighlightRequestedEvent +export class Overlay_nodeHighlightRequestedEvent extends CustomEvent { constructor(detail: Overlay_nodeHighlightRequested) { super("Overlay.nodeHighlightRequested", { detail }); } } -interface Overlay_screenshotRequested { +export interface Overlay_screenshotRequested { /** * Viewport to capture, in device independent pixels (dip). */ viewport: Page_Viewport; } -class Overlay_screenshotRequestedEvent +export class Overlay_screenshotRequestedEvent extends CustomEvent { constructor(detail: Overlay_screenshotRequested) { super("Overlay.screenshotRequested", { detail }); } } -interface Page_domContentEventFired { +export interface Page_domContentEventFired { timestamp: Network_MonotonicTime; } -class Page_domContentEventFiredEvent +export class Page_domContentEventFiredEvent extends CustomEvent { constructor(detail: Page_domContentEventFired) { super("Page.domContentEventFired", { detail }); } } -interface Page_fileChooserOpened { +export interface Page_fileChooserOpened { /** * @experimental * Id of the frame containing input node. @@ -10567,13 +10581,14 @@ interface Page_fileChooserOpened { backendNodeId?: DOM_BackendNodeId; } -class Page_fileChooserOpenedEvent extends CustomEvent { +export class Page_fileChooserOpenedEvent + extends CustomEvent { constructor(detail: Page_fileChooserOpened) { super("Page.fileChooserOpened", { detail }); } } -interface Page_frameAttached { +export interface Page_frameAttached { /** * Id of the frame that has been attached. */ @@ -10588,27 +10603,27 @@ interface Page_frameAttached { stack?: Runtime_StackTrace; } -class Page_frameAttachedEvent extends CustomEvent { +export class Page_frameAttachedEvent extends CustomEvent { constructor(detail: Page_frameAttached) { super("Page.frameAttached", { detail }); } } -interface Page_frameClearedScheduledNavigation { +export interface Page_frameClearedScheduledNavigation { /** * Id of the frame that has cleared its scheduled navigation. */ frameId: Page_FrameId; } -class Page_frameClearedScheduledNavigationEvent +export class Page_frameClearedScheduledNavigationEvent extends CustomEvent { constructor(detail: Page_frameClearedScheduledNavigation) { super("Page.frameClearedScheduledNavigation", { detail }); } } -interface Page_frameDetached { +export interface Page_frameDetached { /** * Id of the frame that has been detached. */ @@ -10619,13 +10634,13 @@ interface Page_frameDetached { reason: "remove" | "swap"; } -class Page_frameDetachedEvent extends CustomEvent { +export class Page_frameDetachedEvent extends CustomEvent { constructor(detail: Page_frameDetached) { super("Page.frameDetached", { detail }); } } -interface Page_frameNavigated { +export interface Page_frameNavigated { /** * Frame object. */ @@ -10636,26 +10651,26 @@ interface Page_frameNavigated { type: Page_NavigationType; } -class Page_frameNavigatedEvent extends CustomEvent { +export class Page_frameNavigatedEvent extends CustomEvent { constructor(detail: Page_frameNavigated) { super("Page.frameNavigated", { detail }); } } -interface Page_documentOpened { +export interface Page_documentOpened { /** * Frame object. */ frame: Page_Frame; } -class Page_documentOpenedEvent extends CustomEvent { +export class Page_documentOpenedEvent extends CustomEvent { constructor(detail: Page_documentOpened) { super("Page.documentOpened", { detail }); } } -interface Page_frameRequestedNavigation { +export interface Page_frameRequestedNavigation { /** * Id of the frame that is being navigated. */ @@ -10674,14 +10689,14 @@ interface Page_frameRequestedNavigation { disposition: Page_ClientNavigationDisposition; } -class Page_frameRequestedNavigationEvent +export class Page_frameRequestedNavigationEvent extends CustomEvent { constructor(detail: Page_frameRequestedNavigation) { super("Page.frameRequestedNavigation", { detail }); } } -interface Page_frameScheduledNavigation { +export interface Page_frameScheduledNavigation { /** * Id of the frame that has scheduled a navigation. */ @@ -10701,42 +10716,42 @@ interface Page_frameScheduledNavigation { url: string; } -class Page_frameScheduledNavigationEvent +export class Page_frameScheduledNavigationEvent extends CustomEvent { constructor(detail: Page_frameScheduledNavigation) { super("Page.frameScheduledNavigation", { detail }); } } -interface Page_frameStartedLoading { +export interface Page_frameStartedLoading { /** * Id of the frame that has started loading. */ frameId: Page_FrameId; } -class Page_frameStartedLoadingEvent +export class Page_frameStartedLoadingEvent extends CustomEvent { constructor(detail: Page_frameStartedLoading) { super("Page.frameStartedLoading", { detail }); } } -interface Page_frameStoppedLoading { +export interface Page_frameStoppedLoading { /** * Id of the frame that has stopped loading. */ frameId: Page_FrameId; } -class Page_frameStoppedLoadingEvent +export class Page_frameStoppedLoadingEvent extends CustomEvent { constructor(detail: Page_frameStoppedLoading) { super("Page.frameStoppedLoading", { detail }); } } -interface Page_downloadWillBegin { +export interface Page_downloadWillBegin { /** * Id of the frame that caused download to begin. */ @@ -10755,13 +10770,14 @@ interface Page_downloadWillBegin { suggestedFilename: string; } -class Page_downloadWillBeginEvent extends CustomEvent { +export class Page_downloadWillBeginEvent + extends CustomEvent { constructor(detail: Page_downloadWillBegin) { super("Page.downloadWillBegin", { detail }); } } -interface Page_downloadProgress { +export interface Page_downloadProgress { /** * Global unique identifier of the download. */ @@ -10780,13 +10796,14 @@ interface Page_downloadProgress { state: "inProgress" | "completed" | "canceled"; } -class Page_downloadProgressEvent extends CustomEvent { +export class Page_downloadProgressEvent + extends CustomEvent { constructor(detail: Page_downloadProgress) { super("Page.downloadProgress", { detail }); } } -interface Page_javascriptDialogClosed { +export interface Page_javascriptDialogClosed { /** * Whether dialog was confirmed. */ @@ -10797,14 +10814,14 @@ interface Page_javascriptDialogClosed { userInput: string; } -class Page_javascriptDialogClosedEvent +export class Page_javascriptDialogClosedEvent extends CustomEvent { constructor(detail: Page_javascriptDialogClosed) { super("Page.javascriptDialogClosed", { detail }); } } -interface Page_javascriptDialogOpening { +export interface Page_javascriptDialogOpening { /** * Frame url. */ @@ -10829,14 +10846,14 @@ interface Page_javascriptDialogOpening { defaultPrompt?: string; } -class Page_javascriptDialogOpeningEvent +export class Page_javascriptDialogOpeningEvent extends CustomEvent { constructor(detail: Page_javascriptDialogOpening) { super("Page.javascriptDialogOpening", { detail }); } } -interface Page_lifecycleEvent { +export interface Page_lifecycleEvent { /** * Id of the frame. */ @@ -10849,13 +10866,13 @@ interface Page_lifecycleEvent { timestamp: Network_MonotonicTime; } -class Page_lifecycleEventEvent extends CustomEvent { +export class Page_lifecycleEventEvent extends CustomEvent { constructor(detail: Page_lifecycleEvent) { super("Page.lifecycleEvent", { detail }); } } -interface Page_backForwardCacheNotUsed { +export interface Page_backForwardCacheNotUsed { /** * The loader id for the associated navgation. */ @@ -10874,24 +10891,24 @@ interface Page_backForwardCacheNotUsed { notRestoredExplanationsTree?: Page_BackForwardCacheNotRestoredExplanationTree; } -class Page_backForwardCacheNotUsedEvent +export class Page_backForwardCacheNotUsedEvent extends CustomEvent { constructor(detail: Page_backForwardCacheNotUsed) { super("Page.backForwardCacheNotUsed", { detail }); } } -interface Page_loadEventFired { +export interface Page_loadEventFired { timestamp: Network_MonotonicTime; } -class Page_loadEventFiredEvent extends CustomEvent { +export class Page_loadEventFiredEvent extends CustomEvent { constructor(detail: Page_loadEventFired) { super("Page.loadEventFired", { detail }); } } -interface Page_navigatedWithinDocument { +export interface Page_navigatedWithinDocument { /** * Id of the frame. */ @@ -10902,14 +10919,14 @@ interface Page_navigatedWithinDocument { url: string; } -class Page_navigatedWithinDocumentEvent +export class Page_navigatedWithinDocumentEvent extends CustomEvent { constructor(detail: Page_navigatedWithinDocument) { super("Page.navigatedWithinDocument", { detail }); } } -interface Page_screencastFrame { +export interface Page_screencastFrame { /** * Base64-encoded compressed image. */ @@ -10924,27 +10941,28 @@ interface Page_screencastFrame { sessionId: number; } -class Page_screencastFrameEvent extends CustomEvent { +export class Page_screencastFrameEvent + extends CustomEvent { constructor(detail: Page_screencastFrame) { super("Page.screencastFrame", { detail }); } } -interface Page_screencastVisibilityChanged { +export interface Page_screencastVisibilityChanged { /** * True if the page is visible. */ visible: boolean; } -class Page_screencastVisibilityChangedEvent +export class Page_screencastVisibilityChangedEvent extends CustomEvent { constructor(detail: Page_screencastVisibilityChanged) { super("Page.screencastVisibilityChanged", { detail }); } } -interface Page_windowOpen { +export interface Page_windowOpen { /** * The URL for the new window. */ @@ -10963,13 +10981,13 @@ interface Page_windowOpen { userGesture: boolean; } -class Page_windowOpenEvent extends CustomEvent { +export class Page_windowOpenEvent extends CustomEvent { constructor(detail: Page_windowOpen) { super("Page.windowOpen", { detail }); } } -interface Page_compilationCacheProduced { +export interface Page_compilationCacheProduced { url: string; /** * Base64-encoded data @@ -10977,14 +10995,14 @@ interface Page_compilationCacheProduced { data: string; } -class Page_compilationCacheProducedEvent +export class Page_compilationCacheProducedEvent extends CustomEvent { constructor(detail: Page_compilationCacheProduced) { super("Page.compilationCacheProduced", { detail }); } } -interface Performance_metrics { +export interface Performance_metrics { /** * Current values of the metrics. */ @@ -10995,24 +11013,24 @@ interface Performance_metrics { title: string; } -class Performance_metricsEvent extends CustomEvent { +export class Performance_metricsEvent extends CustomEvent { constructor(detail: Performance_metrics) { super("Performance.metrics", { detail }); } } -interface PerformanceTimeline_timelineEventAdded { +export interface PerformanceTimeline_timelineEventAdded { event: PerformanceTimeline_TimelineEvent; } -class PerformanceTimeline_timelineEventAddedEvent +export class PerformanceTimeline_timelineEventAddedEvent extends CustomEvent { constructor(detail: PerformanceTimeline_timelineEventAdded) { super("PerformanceTimeline.timelineEventAdded", { detail }); } } -interface Security_certificateError { +export interface Security_certificateError { /** * The ID of the event. */ @@ -11027,28 +11045,28 @@ interface Security_certificateError { requestURL: string; } -class Security_certificateErrorEvent +export class Security_certificateErrorEvent extends CustomEvent { constructor(detail: Security_certificateError) { super("Security.certificateError", { detail }); } } -interface Security_visibleSecurityStateChanged { +export interface Security_visibleSecurityStateChanged { /** * Security state information about the page. */ visibleSecurityState: Security_VisibleSecurityState; } -class Security_visibleSecurityStateChangedEvent +export class Security_visibleSecurityStateChangedEvent extends CustomEvent { constructor(detail: Security_visibleSecurityStateChanged) { super("Security.visibleSecurityStateChanged", { detail }); } } -interface Security_securityStateChanged { +export interface Security_securityStateChanged { /** * Security state. */ @@ -11076,47 +11094,47 @@ interface Security_securityStateChanged { summary?: string; } -class Security_securityStateChangedEvent +export class Security_securityStateChangedEvent extends CustomEvent { constructor(detail: Security_securityStateChanged) { super("Security.securityStateChanged", { detail }); } } -interface ServiceWorker_workerErrorReported { +export interface ServiceWorker_workerErrorReported { errorMessage: ServiceWorker_ServiceWorkerErrorMessage; } -class ServiceWorker_workerErrorReportedEvent +export class ServiceWorker_workerErrorReportedEvent extends CustomEvent { constructor(detail: ServiceWorker_workerErrorReported) { super("ServiceWorker.workerErrorReported", { detail }); } } -interface ServiceWorker_workerRegistrationUpdated { +export interface ServiceWorker_workerRegistrationUpdated { registrations: ServiceWorker_ServiceWorkerRegistration[]; } -class ServiceWorker_workerRegistrationUpdatedEvent +export class ServiceWorker_workerRegistrationUpdatedEvent extends CustomEvent { constructor(detail: ServiceWorker_workerRegistrationUpdated) { super("ServiceWorker.workerRegistrationUpdated", { detail }); } } -interface ServiceWorker_workerVersionUpdated { +export interface ServiceWorker_workerVersionUpdated { versions: ServiceWorker_ServiceWorkerVersion[]; } -class ServiceWorker_workerVersionUpdatedEvent +export class ServiceWorker_workerVersionUpdatedEvent extends CustomEvent { constructor(detail: ServiceWorker_workerVersionUpdated) { super("ServiceWorker.workerVersionUpdated", { detail }); } } -interface Storage_cacheStorageContentUpdated { +export interface Storage_cacheStorageContentUpdated { /** * Origin to update. */ @@ -11135,14 +11153,14 @@ interface Storage_cacheStorageContentUpdated { cacheName: string; } -class Storage_cacheStorageContentUpdatedEvent +export class Storage_cacheStorageContentUpdatedEvent extends CustomEvent { constructor(detail: Storage_cacheStorageContentUpdated) { super("Storage.cacheStorageContentUpdated", { detail }); } } -interface Storage_cacheStorageListUpdated { +export interface Storage_cacheStorageListUpdated { /** * Origin to update. */ @@ -11157,14 +11175,14 @@ interface Storage_cacheStorageListUpdated { bucketId: string; } -class Storage_cacheStorageListUpdatedEvent +export class Storage_cacheStorageListUpdatedEvent extends CustomEvent { constructor(detail: Storage_cacheStorageListUpdated) { super("Storage.cacheStorageListUpdated", { detail }); } } -interface Storage_indexedDBContentUpdated { +export interface Storage_indexedDBContentUpdated { /** * Origin to update. */ @@ -11187,14 +11205,14 @@ interface Storage_indexedDBContentUpdated { objectStoreName: string; } -class Storage_indexedDBContentUpdatedEvent +export class Storage_indexedDBContentUpdatedEvent extends CustomEvent { constructor(detail: Storage_indexedDBContentUpdated) { super("Storage.indexedDBContentUpdated", { detail }); } } -interface Storage_indexedDBListUpdated { +export interface Storage_indexedDBListUpdated { /** * Origin to update. */ @@ -11209,28 +11227,28 @@ interface Storage_indexedDBListUpdated { bucketId: string; } -class Storage_indexedDBListUpdatedEvent +export class Storage_indexedDBListUpdatedEvent extends CustomEvent { constructor(detail: Storage_indexedDBListUpdated) { super("Storage.indexedDBListUpdated", { detail }); } } -interface Storage_interestGroupAccessed { +export interface Storage_interestGroupAccessed { accessTime: Network_TimeSinceEpoch; type: Storage_InterestGroupAccessType; ownerOrigin: string; name: string; } -class Storage_interestGroupAccessedEvent +export class Storage_interestGroupAccessedEvent extends CustomEvent { constructor(detail: Storage_interestGroupAccessed) { super("Storage.interestGroupAccessed", { detail }); } } -interface Storage_sharedStorageAccessed { +export interface Storage_sharedStorageAccessed { /** * Time of the access. */ @@ -11254,48 +11272,48 @@ interface Storage_sharedStorageAccessed { params: Storage_SharedStorageAccessParams; } -class Storage_sharedStorageAccessedEvent +export class Storage_sharedStorageAccessedEvent extends CustomEvent { constructor(detail: Storage_sharedStorageAccessed) { super("Storage.sharedStorageAccessed", { detail }); } } -interface Storage_storageBucketCreatedOrUpdated { +export interface Storage_storageBucketCreatedOrUpdated { bucketInfo: Storage_StorageBucketInfo; } -class Storage_storageBucketCreatedOrUpdatedEvent +export class Storage_storageBucketCreatedOrUpdatedEvent extends CustomEvent { constructor(detail: Storage_storageBucketCreatedOrUpdated) { super("Storage.storageBucketCreatedOrUpdated", { detail }); } } -interface Storage_storageBucketDeleted { +export interface Storage_storageBucketDeleted { bucketId: string; } -class Storage_storageBucketDeletedEvent +export class Storage_storageBucketDeletedEvent extends CustomEvent { constructor(detail: Storage_storageBucketDeleted) { super("Storage.storageBucketDeleted", { detail }); } } -interface Storage_attributionReportingSourceRegistered { +export interface Storage_attributionReportingSourceRegistered { registration: Storage_AttributionReportingSourceRegistration; result: Storage_AttributionReportingSourceRegistrationResult; } -class Storage_attributionReportingSourceRegisteredEvent +export class Storage_attributionReportingSourceRegisteredEvent extends CustomEvent { constructor(detail: Storage_attributionReportingSourceRegistered) { super("Storage.attributionReportingSourceRegistered", { detail }); } } -interface Target_attachedToTarget { +export interface Target_attachedToTarget { /** * Identifier assigned to the session used to send/receive messages. */ @@ -11304,14 +11322,14 @@ interface Target_attachedToTarget { waitingForDebugger: boolean; } -class Target_attachedToTargetEvent +export class Target_attachedToTargetEvent extends CustomEvent { constructor(detail: Target_attachedToTarget) { super("Target.attachedToTarget", { detail }); } } -interface Target_detachedFromTarget { +export interface Target_detachedFromTarget { /** * Detached session identifier. */ @@ -11323,14 +11341,14 @@ interface Target_detachedFromTarget { targetId?: Target_TargetID; } -class Target_detachedFromTargetEvent +export class Target_detachedFromTargetEvent extends CustomEvent { constructor(detail: Target_detachedFromTarget) { super("Target.detachedFromTarget", { detail }); } } -interface Target_receivedMessageFromTarget { +export interface Target_receivedMessageFromTarget { /** * Identifier of a session which sends a message. */ @@ -11343,34 +11361,36 @@ interface Target_receivedMessageFromTarget { targetId?: Target_TargetID; } -class Target_receivedMessageFromTargetEvent +export class Target_receivedMessageFromTargetEvent extends CustomEvent { constructor(detail: Target_receivedMessageFromTarget) { super("Target.receivedMessageFromTarget", { detail }); } } -interface Target_targetCreated { +export interface Target_targetCreated { targetInfo: Target_TargetInfo; } -class Target_targetCreatedEvent extends CustomEvent { +export class Target_targetCreatedEvent + extends CustomEvent { constructor(detail: Target_targetCreated) { super("Target.targetCreated", { detail }); } } -interface Target_targetDestroyed { +export interface Target_targetDestroyed { targetId: Target_TargetID; } -class Target_targetDestroyedEvent extends CustomEvent { +export class Target_targetDestroyedEvent + extends CustomEvent { constructor(detail: Target_targetDestroyed) { super("Target.targetDestroyed", { detail }); } } -interface Target_targetCrashed { +export interface Target_targetCrashed { targetId: Target_TargetID; /** * Termination status type. @@ -11382,24 +11402,25 @@ interface Target_targetCrashed { errorCode: number; } -class Target_targetCrashedEvent extends CustomEvent { +export class Target_targetCrashedEvent + extends CustomEvent { constructor(detail: Target_targetCrashed) { super("Target.targetCrashed", { detail }); } } -interface Target_targetInfoChanged { +export interface Target_targetInfoChanged { targetInfo: Target_TargetInfo; } -class Target_targetInfoChangedEvent +export class Target_targetInfoChangedEvent extends CustomEvent { constructor(detail: Target_targetInfoChanged) { super("Target.targetInfoChanged", { detail }); } } -interface Tethering_accepted { +export interface Tethering_accepted { /** * Port number that was successfully bound. */ @@ -11410,13 +11431,13 @@ interface Tethering_accepted { connectionId: string; } -class Tethering_acceptedEvent extends CustomEvent { +export class Tethering_acceptedEvent extends CustomEvent { constructor(detail: Tethering_accepted) { super("Tethering.accepted", { detail }); } } -interface Tracing_bufferUsage { +export interface Tracing_bufferUsage { /** * A number in range [0..1] that indicates the used size of event buffer as a fraction of its * total size. @@ -11433,23 +11454,24 @@ interface Tracing_bufferUsage { value?: number; } -class Tracing_bufferUsageEvent extends CustomEvent { +export class Tracing_bufferUsageEvent extends CustomEvent { constructor(detail: Tracing_bufferUsage) { super("Tracing.bufferUsage", { detail }); } } -interface Tracing_dataCollected { +export interface Tracing_dataCollected { value: object[]; } -class Tracing_dataCollectedEvent extends CustomEvent { +export class Tracing_dataCollectedEvent + extends CustomEvent { constructor(detail: Tracing_dataCollected) { super("Tracing.dataCollected", { detail }); } } -interface Tracing_tracingComplete { +export interface Tracing_tracingComplete { /** * Indicates whether some trace data is known to have been lost, e.g. because the trace ring * buffer wrapped around. @@ -11469,14 +11491,14 @@ interface Tracing_tracingComplete { streamCompression?: Tracing_StreamCompression; } -class Tracing_tracingCompleteEvent +export class Tracing_tracingCompleteEvent extends CustomEvent { constructor(detail: Tracing_tracingComplete) { super("Tracing.tracingComplete", { detail }); } } -interface Fetch_requestPaused { +export interface Fetch_requestPaused { /** * Each request the page makes will have a unique id. */ @@ -11522,13 +11544,13 @@ interface Fetch_requestPaused { redirectedRequestId?: Fetch_RequestId; } -class Fetch_requestPausedEvent extends CustomEvent { +export class Fetch_requestPausedEvent extends CustomEvent { constructor(detail: Fetch_requestPaused) { super("Fetch.requestPaused", { detail }); } } -interface Fetch_authRequired { +export interface Fetch_authRequired { /** * Each request the page makes will have a unique id. */ @@ -11553,116 +11575,116 @@ interface Fetch_authRequired { authChallenge: Fetch_AuthChallenge; } -class Fetch_authRequiredEvent extends CustomEvent { +export class Fetch_authRequiredEvent extends CustomEvent { constructor(detail: Fetch_authRequired) { super("Fetch.authRequired", { detail }); } } -interface WebAudio_contextCreated { +export interface WebAudio_contextCreated { context: WebAudio_BaseAudioContext; } -class WebAudio_contextCreatedEvent +export class WebAudio_contextCreatedEvent extends CustomEvent { constructor(detail: WebAudio_contextCreated) { super("WebAudio.contextCreated", { detail }); } } -interface WebAudio_contextWillBeDestroyed { +export interface WebAudio_contextWillBeDestroyed { contextId: WebAudio_GraphObjectId; } -class WebAudio_contextWillBeDestroyedEvent +export class WebAudio_contextWillBeDestroyedEvent extends CustomEvent { constructor(detail: WebAudio_contextWillBeDestroyed) { super("WebAudio.contextWillBeDestroyed", { detail }); } } -interface WebAudio_contextChanged { +export interface WebAudio_contextChanged { context: WebAudio_BaseAudioContext; } -class WebAudio_contextChangedEvent +export class WebAudio_contextChangedEvent extends CustomEvent { constructor(detail: WebAudio_contextChanged) { super("WebAudio.contextChanged", { detail }); } } -interface WebAudio_audioListenerCreated { +export interface WebAudio_audioListenerCreated { listener: WebAudio_AudioListener; } -class WebAudio_audioListenerCreatedEvent +export class WebAudio_audioListenerCreatedEvent extends CustomEvent { constructor(detail: WebAudio_audioListenerCreated) { super("WebAudio.audioListenerCreated", { detail }); } } -interface WebAudio_audioListenerWillBeDestroyed { +export interface WebAudio_audioListenerWillBeDestroyed { contextId: WebAudio_GraphObjectId; listenerId: WebAudio_GraphObjectId; } -class WebAudio_audioListenerWillBeDestroyedEvent +export class WebAudio_audioListenerWillBeDestroyedEvent extends CustomEvent { constructor(detail: WebAudio_audioListenerWillBeDestroyed) { super("WebAudio.audioListenerWillBeDestroyed", { detail }); } } -interface WebAudio_audioNodeCreated { +export interface WebAudio_audioNodeCreated { node: WebAudio_AudioNode; } -class WebAudio_audioNodeCreatedEvent +export class WebAudio_audioNodeCreatedEvent extends CustomEvent { constructor(detail: WebAudio_audioNodeCreated) { super("WebAudio.audioNodeCreated", { detail }); } } -interface WebAudio_audioNodeWillBeDestroyed { +export interface WebAudio_audioNodeWillBeDestroyed { contextId: WebAudio_GraphObjectId; nodeId: WebAudio_GraphObjectId; } -class WebAudio_audioNodeWillBeDestroyedEvent +export class WebAudio_audioNodeWillBeDestroyedEvent extends CustomEvent { constructor(detail: WebAudio_audioNodeWillBeDestroyed) { super("WebAudio.audioNodeWillBeDestroyed", { detail }); } } -interface WebAudio_audioParamCreated { +export interface WebAudio_audioParamCreated { param: WebAudio_AudioParam; } -class WebAudio_audioParamCreatedEvent +export class WebAudio_audioParamCreatedEvent extends CustomEvent { constructor(detail: WebAudio_audioParamCreated) { super("WebAudio.audioParamCreated", { detail }); } } -interface WebAudio_audioParamWillBeDestroyed { +export interface WebAudio_audioParamWillBeDestroyed { contextId: WebAudio_GraphObjectId; nodeId: WebAudio_GraphObjectId; paramId: WebAudio_GraphObjectId; } -class WebAudio_audioParamWillBeDestroyedEvent +export class WebAudio_audioParamWillBeDestroyedEvent extends CustomEvent { constructor(detail: WebAudio_audioParamWillBeDestroyed) { super("WebAudio.audioParamWillBeDestroyed", { detail }); } } -interface WebAudio_nodesConnected { +export interface WebAudio_nodesConnected { contextId: WebAudio_GraphObjectId; sourceId: WebAudio_GraphObjectId; destinationId: WebAudio_GraphObjectId; @@ -11670,14 +11692,14 @@ interface WebAudio_nodesConnected { destinationInputIndex?: number; } -class WebAudio_nodesConnectedEvent +export class WebAudio_nodesConnectedEvent extends CustomEvent { constructor(detail: WebAudio_nodesConnected) { super("WebAudio.nodesConnected", { detail }); } } -interface WebAudio_nodesDisconnected { +export interface WebAudio_nodesDisconnected { contextId: WebAudio_GraphObjectId; sourceId: WebAudio_GraphObjectId; destinationId: WebAudio_GraphObjectId; @@ -11685,156 +11707,159 @@ interface WebAudio_nodesDisconnected { destinationInputIndex?: number; } -class WebAudio_nodesDisconnectedEvent +export class WebAudio_nodesDisconnectedEvent extends CustomEvent { constructor(detail: WebAudio_nodesDisconnected) { super("WebAudio.nodesDisconnected", { detail }); } } -interface WebAudio_nodeParamConnected { +export interface WebAudio_nodeParamConnected { contextId: WebAudio_GraphObjectId; sourceId: WebAudio_GraphObjectId; destinationId: WebAudio_GraphObjectId; sourceOutputIndex?: number; } -class WebAudio_nodeParamConnectedEvent +export class WebAudio_nodeParamConnectedEvent extends CustomEvent { constructor(detail: WebAudio_nodeParamConnected) { super("WebAudio.nodeParamConnected", { detail }); } } -interface WebAudio_nodeParamDisconnected { +export interface WebAudio_nodeParamDisconnected { contextId: WebAudio_GraphObjectId; sourceId: WebAudio_GraphObjectId; destinationId: WebAudio_GraphObjectId; sourceOutputIndex?: number; } -class WebAudio_nodeParamDisconnectedEvent +export class WebAudio_nodeParamDisconnectedEvent extends CustomEvent { constructor(detail: WebAudio_nodeParamDisconnected) { super("WebAudio.nodeParamDisconnected", { detail }); } } -interface WebAuthn_credentialAdded { +export interface WebAuthn_credentialAdded { authenticatorId: WebAuthn_AuthenticatorId; credential: WebAuthn_Credential; } -class WebAuthn_credentialAddedEvent +export class WebAuthn_credentialAddedEvent extends CustomEvent { constructor(detail: WebAuthn_credentialAdded) { super("WebAuthn.credentialAdded", { detail }); } } -interface WebAuthn_credentialAsserted { +export interface WebAuthn_credentialAsserted { authenticatorId: WebAuthn_AuthenticatorId; credential: WebAuthn_Credential; } -class WebAuthn_credentialAssertedEvent +export class WebAuthn_credentialAssertedEvent extends CustomEvent { constructor(detail: WebAuthn_credentialAsserted) { super("WebAuthn.credentialAsserted", { detail }); } } -interface Media_playerPropertiesChanged { +export interface Media_playerPropertiesChanged { playerId: Media_PlayerId; properties: Media_PlayerProperty[]; } -class Media_playerPropertiesChangedEvent +export class Media_playerPropertiesChangedEvent extends CustomEvent { constructor(detail: Media_playerPropertiesChanged) { super("Media.playerPropertiesChanged", { detail }); } } -interface Media_playerEventsAdded { +export interface Media_playerEventsAdded { playerId: Media_PlayerId; events: Media_PlayerEvent[]; } -class Media_playerEventsAddedEvent +export class Media_playerEventsAddedEvent extends CustomEvent { constructor(detail: Media_playerEventsAdded) { super("Media.playerEventsAdded", { detail }); } } -interface Media_playerMessagesLogged { +export interface Media_playerMessagesLogged { playerId: Media_PlayerId; messages: Media_PlayerMessage[]; } -class Media_playerMessagesLoggedEvent +export class Media_playerMessagesLoggedEvent extends CustomEvent { constructor(detail: Media_playerMessagesLogged) { super("Media.playerMessagesLogged", { detail }); } } -interface Media_playerErrorsRaised { +export interface Media_playerErrorsRaised { playerId: Media_PlayerId; errors: Media_PlayerError[]; } -class Media_playerErrorsRaisedEvent +export class Media_playerErrorsRaisedEvent extends CustomEvent { constructor(detail: Media_playerErrorsRaised) { super("Media.playerErrorsRaised", { detail }); } } -interface Media_playersCreated { +export interface Media_playersCreated { players: Media_PlayerId[]; } -class Media_playersCreatedEvent extends CustomEvent { +export class Media_playersCreatedEvent + extends CustomEvent { constructor(detail: Media_playersCreated) { super("Media.playersCreated", { detail }); } } -interface DeviceAccess_deviceRequestPrompted { +export interface DeviceAccess_deviceRequestPrompted { id: DeviceAccess_RequestId; devices: DeviceAccess_PromptDevice[]; } -class DeviceAccess_deviceRequestPromptedEvent +export class DeviceAccess_deviceRequestPromptedEvent extends CustomEvent { constructor(detail: DeviceAccess_deviceRequestPrompted) { super("DeviceAccess.deviceRequestPrompted", { detail }); } } -interface Preload_ruleSetUpdated { +export interface Preload_ruleSetUpdated { ruleSet: Preload_RuleSet; } -class Preload_ruleSetUpdatedEvent extends CustomEvent { +export class Preload_ruleSetUpdatedEvent + extends CustomEvent { constructor(detail: Preload_ruleSetUpdated) { super("Preload.ruleSetUpdated", { detail }); } } -interface Preload_ruleSetRemoved { +export interface Preload_ruleSetRemoved { id: Preload_RuleSetId; } -class Preload_ruleSetRemovedEvent extends CustomEvent { +export class Preload_ruleSetRemovedEvent + extends CustomEvent { constructor(detail: Preload_ruleSetRemoved) { super("Preload.ruleSetRemoved", { detail }); } } -interface Preload_prerenderAttemptCompleted { +export interface Preload_prerenderAttemptCompleted { key: Preload_PreloadingAttemptKey; /** * The frame id of the frame initiating prerendering. @@ -11849,14 +11874,14 @@ interface Preload_prerenderAttemptCompleted { disallowedApiMethod?: string; } -class Preload_prerenderAttemptCompletedEvent +export class Preload_prerenderAttemptCompletedEvent extends CustomEvent { constructor(detail: Preload_prerenderAttemptCompleted) { super("Preload.prerenderAttemptCompleted", { detail }); } } -interface Preload_preloadEnabledStateUpdated { +export interface Preload_preloadEnabledStateUpdated { disabledByPreference: boolean; disabledByDataSaver: boolean; disabledByBatterySaver: boolean; @@ -11864,14 +11889,14 @@ interface Preload_preloadEnabledStateUpdated { disabledByHoldbackPrerenderSpeculationRules: boolean; } -class Preload_preloadEnabledStateUpdatedEvent +export class Preload_preloadEnabledStateUpdatedEvent extends CustomEvent { constructor(detail: Preload_preloadEnabledStateUpdated) { super("Preload.preloadEnabledStateUpdated", { detail }); } } -interface Preload_prefetchStatusUpdated { +export interface Preload_prefetchStatusUpdated { key: Preload_PreloadingAttemptKey; /** * The frame id of the frame initiating prefetch. @@ -11883,14 +11908,14 @@ interface Preload_prefetchStatusUpdated { requestId: Network_RequestId; } -class Preload_prefetchStatusUpdatedEvent +export class Preload_prefetchStatusUpdatedEvent extends CustomEvent { constructor(detail: Preload_prefetchStatusUpdated) { super("Preload.prefetchStatusUpdated", { detail }); } } -interface Preload_prerenderStatusUpdated { +export interface Preload_prerenderStatusUpdated { key: Preload_PreloadingAttemptKey; status: Preload_PreloadingStatus; prerenderStatus?: Preload_PrerenderFinalStatus; @@ -11901,26 +11926,26 @@ interface Preload_prerenderStatusUpdated { disallowedMojoInterface?: string; } -class Preload_prerenderStatusUpdatedEvent +export class Preload_prerenderStatusUpdatedEvent extends CustomEvent { constructor(detail: Preload_prerenderStatusUpdated) { super("Preload.prerenderStatusUpdated", { detail }); } } -interface Preload_preloadingAttemptSourcesUpdated { +export interface Preload_preloadingAttemptSourcesUpdated { loaderId: Network_LoaderId; preloadingAttemptSources: Preload_PreloadingAttemptSource[]; } -class Preload_preloadingAttemptSourcesUpdatedEvent +export class Preload_preloadingAttemptSourcesUpdatedEvent extends CustomEvent { constructor(detail: Preload_preloadingAttemptSourcesUpdated) { super("Preload.preloadingAttemptSourcesUpdated", { detail }); } } -interface FedCm_dialogShown { +export interface FedCm_dialogShown { dialogId: string; dialogType: FedCm_DialogType; accounts: FedCm_Account[]; @@ -11932,26 +11957,27 @@ interface FedCm_dialogShown { subtitle?: string; } -class FedCm_dialogShownEvent extends CustomEvent { +export class FedCm_dialogShownEvent extends CustomEvent { constructor(detail: FedCm_dialogShown) { super("FedCm.dialogShown", { detail }); } } -interface Console_messageAdded { +export interface Console_messageAdded { /** * Console message that has been added. */ message: Console_ConsoleMessage; } -class Console_messageAddedEvent extends CustomEvent { +export class Console_messageAddedEvent + extends CustomEvent { constructor(detail: Console_messageAdded) { super("Console.messageAdded", { detail }); } } -interface Debugger_breakpointResolved { +export interface Debugger_breakpointResolved { /** * Breakpoint unique identifier. */ @@ -11962,14 +11988,14 @@ interface Debugger_breakpointResolved { location: Debugger_Location; } -class Debugger_breakpointResolvedEvent +export class Debugger_breakpointResolvedEvent extends CustomEvent { constructor(detail: Debugger_breakpointResolved) { super("Debugger.breakpointResolved", { detail }); } } -interface Debugger_paused { +export interface Debugger_paused { /** * Call stack the virtual machine stopped on. */ @@ -12016,13 +12042,13 @@ interface Debugger_paused { asyncCallStackTraceId?: Runtime_StackTraceId; } -class Debugger_pausedEvent extends CustomEvent { +export class Debugger_pausedEvent extends CustomEvent { constructor(detail: Debugger_paused) { super("Debugger.paused", { detail }); } } -interface Debugger_scriptFailedToParse { +export interface Debugger_scriptFailedToParse { /** * Identifier of the script parsed. */ @@ -12097,14 +12123,14 @@ interface Debugger_scriptFailedToParse { embedderName?: string; } -class Debugger_scriptFailedToParseEvent +export class Debugger_scriptFailedToParseEvent extends CustomEvent { constructor(detail: Debugger_scriptFailedToParse) { super("Debugger.scriptFailedToParse", { detail }); } } -interface Debugger_scriptParsed { +export interface Debugger_scriptParsed { /** * Identifier of the script parsed. */ @@ -12189,24 +12215,25 @@ interface Debugger_scriptParsed { embedderName?: string; } -class Debugger_scriptParsedEvent extends CustomEvent { +export class Debugger_scriptParsedEvent + extends CustomEvent { constructor(detail: Debugger_scriptParsed) { super("Debugger.scriptParsed", { detail }); } } -interface HeapProfiler_addHeapSnapshotChunk { +export interface HeapProfiler_addHeapSnapshotChunk { chunk: string; } -class HeapProfiler_addHeapSnapshotChunkEvent +export class HeapProfiler_addHeapSnapshotChunkEvent extends CustomEvent { constructor(detail: HeapProfiler_addHeapSnapshotChunk) { super("HeapProfiler.addHeapSnapshotChunk", { detail }); } } -interface HeapProfiler_heapStatsUpdate { +export interface HeapProfiler_heapStatsUpdate { /** * An array of triplets. Each triplet describes a fragment. The first integer is the fragment * index, the second integer is a total count of objects for the fragment, the third integer is @@ -12215,39 +12242,39 @@ interface HeapProfiler_heapStatsUpdate { statsUpdate: number[]; } -class HeapProfiler_heapStatsUpdateEvent +export class HeapProfiler_heapStatsUpdateEvent extends CustomEvent { constructor(detail: HeapProfiler_heapStatsUpdate) { super("HeapProfiler.heapStatsUpdate", { detail }); } } -interface HeapProfiler_lastSeenObjectId { +export interface HeapProfiler_lastSeenObjectId { lastSeenObjectId: number; timestamp: number; } -class HeapProfiler_lastSeenObjectIdEvent +export class HeapProfiler_lastSeenObjectIdEvent extends CustomEvent { constructor(detail: HeapProfiler_lastSeenObjectId) { super("HeapProfiler.lastSeenObjectId", { detail }); } } -interface HeapProfiler_reportHeapSnapshotProgress { +export interface HeapProfiler_reportHeapSnapshotProgress { done: number; total: number; finished?: boolean; } -class HeapProfiler_reportHeapSnapshotProgressEvent +export class HeapProfiler_reportHeapSnapshotProgressEvent extends CustomEvent { constructor(detail: HeapProfiler_reportHeapSnapshotProgress) { super("HeapProfiler.reportHeapSnapshotProgress", { detail }); } } -interface Profiler_consoleProfileFinished { +export interface Profiler_consoleProfileFinished { id: string; /** * Location of console.profileEnd(). @@ -12260,14 +12287,14 @@ interface Profiler_consoleProfileFinished { title?: string; } -class Profiler_consoleProfileFinishedEvent +export class Profiler_consoleProfileFinishedEvent extends CustomEvent { constructor(detail: Profiler_consoleProfileFinished) { super("Profiler.consoleProfileFinished", { detail }); } } -interface Profiler_consoleProfileStarted { +export interface Profiler_consoleProfileStarted { id: string; /** * Location of console.profile(). @@ -12279,14 +12306,14 @@ interface Profiler_consoleProfileStarted { title?: string; } -class Profiler_consoleProfileStartedEvent +export class Profiler_consoleProfileStartedEvent extends CustomEvent { constructor(detail: Profiler_consoleProfileStarted) { super("Profiler.consoleProfileStarted", { detail }); } } -interface Profiler_preciseCoverageDeltaUpdate { +export interface Profiler_preciseCoverageDeltaUpdate { /** * Monotonically increasing time (in seconds) when the coverage update was taken in the backend. */ @@ -12301,14 +12328,14 @@ interface Profiler_preciseCoverageDeltaUpdate { result: Profiler_ScriptCoverage[]; } -class Profiler_preciseCoverageDeltaUpdateEvent +export class Profiler_preciseCoverageDeltaUpdateEvent extends CustomEvent { constructor(detail: Profiler_preciseCoverageDeltaUpdate) { super("Profiler.preciseCoverageDeltaUpdate", { detail }); } } -interface Runtime_bindingCalled { +export interface Runtime_bindingCalled { name: string; payload: string; /** @@ -12317,13 +12344,14 @@ interface Runtime_bindingCalled { executionContextId: Runtime_ExecutionContextId; } -class Runtime_bindingCalledEvent extends CustomEvent { +export class Runtime_bindingCalledEvent + extends CustomEvent { constructor(detail: Runtime_bindingCalled) { super("Runtime.bindingCalled", { detail }); } } -interface Runtime_consoleAPICalled { +export interface Runtime_consoleAPICalled { /** * Type of the call. */ @@ -12373,14 +12401,14 @@ interface Runtime_consoleAPICalled { context?: string; } -class Runtime_consoleAPICalledEvent +export class Runtime_consoleAPICalledEvent extends CustomEvent { constructor(detail: Runtime_consoleAPICalled) { super("Runtime.consoleAPICalled", { detail }); } } -interface Runtime_exceptionRevoked { +export interface Runtime_exceptionRevoked { /** * Reason describing why exception was revoked. */ @@ -12391,14 +12419,14 @@ interface Runtime_exceptionRevoked { exceptionId: number; } -class Runtime_exceptionRevokedEvent +export class Runtime_exceptionRevokedEvent extends CustomEvent { constructor(detail: Runtime_exceptionRevoked) { super("Runtime.exceptionRevoked", { detail }); } } -interface Runtime_exceptionThrown { +export interface Runtime_exceptionThrown { /** * Timestamp of the exception. */ @@ -12406,28 +12434,28 @@ interface Runtime_exceptionThrown { exceptionDetails: Runtime_ExceptionDetails; } -class Runtime_exceptionThrownEvent +export class Runtime_exceptionThrownEvent extends CustomEvent { constructor(detail: Runtime_exceptionThrown) { super("Runtime.exceptionThrown", { detail }); } } -interface Runtime_executionContextCreated { +export interface Runtime_executionContextCreated { /** * A newly created execution context. */ context: Runtime_ExecutionContextDescription; } -class Runtime_executionContextCreatedEvent +export class Runtime_executionContextCreatedEvent extends CustomEvent { constructor(detail: Runtime_executionContextCreated) { super("Runtime.executionContextCreated", { detail }); } } -interface Runtime_executionContextDestroyed { +export interface Runtime_executionContextDestroyed { /** * @deprecated * Id of the destroyed context @@ -12440,14 +12468,14 @@ interface Runtime_executionContextDestroyed { executionContextUniqueId: string; } -class Runtime_executionContextDestroyedEvent +export class Runtime_executionContextDestroyedEvent extends CustomEvent { constructor(detail: Runtime_executionContextDestroyed) { super("Runtime.executionContextDestroyed", { detail }); } } -interface Runtime_inspectRequested { +export interface Runtime_inspectRequested { object: Runtime_RemoteObject; hints: object; /** @@ -12457,7 +12485,7 @@ interface Runtime_inspectRequested { executionContextId?: Runtime_ExecutionContextId; } -class Runtime_inspectRequestedEvent +export class Runtime_inspectRequestedEvent extends CustomEvent { constructor(detail: Runtime_inspectRequested) { super("Runtime.inspectRequested", { detail }); @@ -12673,7 +12701,7 @@ const CelestialEvents = { "Runtime.inspectRequested": Runtime_inspectRequestedEvent, }; -interface CelestialEventMap { +export interface CelestialEventMap { "Accessibility.loadComplete": Accessibility_loadCompleteEvent; "Accessibility.nodesUpdated": Accessibility_nodesUpdatedEvent; "Animation.animationCanceled": Animation_animationCanceledEvent; diff --git a/mod.ts b/mod.ts index c99e20b..869f700 100644 --- a/mod.ts +++ b/mod.ts @@ -1,5 +1,6 @@ export * from "./src/browser.ts"; export * from "./src/cache.ts"; +export * from "./src/dialog.ts"; export * from "./src/elementHandle.ts"; export * from "./src/keyboard.ts"; export * from "./src/mouse.ts"; diff --git a/src/dialog.ts b/src/dialog.ts new file mode 100644 index 0000000..9a4a051 --- /dev/null +++ b/src/dialog.ts @@ -0,0 +1,66 @@ +import type { + Celestial, + Page_DialogType, + Page_javascriptDialogOpening, +} from "../bindings/celestial.ts"; + +export type DialogType = Page_DialogType; + +/** + * Dialog provides an api for managing a page's dialog events. + */ +export class Dialog { + #celestial: Celestial; + #defaultValue: string; + #message: string; + #type: DialogType; + + constructor(celestial: Celestial, config: Page_javascriptDialogOpening) { + this.#celestial = celestial; + this.#defaultValue = config.defaultPrompt ?? ""; + this.#message = config.message; + this.#type = config.type; + } + + /** + * The default value of the prompt, or an empty string if the dialog is not a prompt. + */ + get defaultValue() { + return this.#defaultValue; + } + + /** + * The message displayed in the dialog. + */ + get message() { + return this.#message; + } + + /** + * The type of the dialog. + */ + get type() { + return this.#type; + } + + /** + * Returns when the dialog has been accepted. + * + * @param promptText A text to enter in prompt. Does not cause any effects if the dialog's type is not prompt. Optional. + */ + async accept(promptText?: string) { + await this.#celestial.Page.handleJavaScriptDialog({ + accept: true, + promptText, + }); + } + + /** + * Returns when the dialog has been dismissed. + */ + async dismiss() { + await this.#celestial.Page.handleJavaScriptDialog({ + accept: false, + }); + } +} diff --git a/src/page.ts b/src/page.ts index 432af83..baabf5d 100644 --- a/src/page.ts +++ b/src/page.ts @@ -7,6 +7,7 @@ import { BASE_URL, convertToUint8Array, retryDeadline } from "./util.ts"; import { Mouse } from "./mouse.ts"; import { Keyboard } from "./keyboard.ts"; import { Touchscreen } from "./touchscreen.ts"; +import { Dialog } from "./dialog.ts"; export type DeleteCookieOptions = Omit< Parameters[0], @@ -47,10 +48,20 @@ export interface EvaluateOptions { args: Readonly; } +export interface PageEventMap { + "dialog": DialogEvent; +} + +export class DialogEvent extends CustomEvent { + constructor(detail: Dialog) { + super("dialog", { detail }); + } +} + /** * Page provides methods to interact with a single tab in the browser */ -export class Page { +export class Page extends EventTarget { #id: string; #celestial: Celestial; #browser: Browser; @@ -67,6 +78,8 @@ export class Page { ws: WebSocket, browser: Browser, ) { + super(); + this.#id = id; this.#url = url; this.#celestial = new Celestial(ws); @@ -77,6 +90,12 @@ export class Page { this.#url = frame.urlFragment ?? frame.url; }); + this.#celestial.addEventListener("Page.javascriptDialogOpening", (e) => { + this.dispatchEvent( + new DialogEvent(new Dialog(this.#celestial, e.detail)), + ); + }); + this.mouse = new Mouse(this.#celestial); this.keyboard = new Keyboard(this.#celestial); this.touchscreen = new Touchscreen(this.#celestial); @@ -97,6 +116,16 @@ export class Page { return new ElementHandle(doc.root.nodeId, this.#celestial, this); } + // @ts-ignore see below + addEventListener( + type: K, + listener: (event: PageEventMap[K]) => void, + options?: boolean | AddEventListenerOptions, + ): void { + // @ts-ignore TODO(lino-levan): Investigate why this is wrong + super.addEventListener(type, listener, options); + } + /** * Returns raw celestial bindings for the page. Super unsafe unless you know what you're doing. */ diff --git a/tests/dialog_test.ts b/tests/dialog_test.ts new file mode 100644 index 0000000..2e9382a --- /dev/null +++ b/tests/dialog_test.ts @@ -0,0 +1,77 @@ +import { assertEquals } from "https://deno.land/std@0.198.0/assert/assert_equals.ts"; + +import { launch } from "../mod.ts"; + +Deno.test("Accepting basic alert", async () => { + // Launch browser + const browser = await launch(); + + // Open the webpage + const page = await browser.newPage(); + + // listen for dialog events + page.addEventListener("dialog", async (e) => { + const dialog = e.detail; + + assertEquals(dialog.message, "hi"); + assertEquals(dialog.type, "alert"); + + await dialog.accept(); + }); + + // navigate to a page with an alert + await page.goto("data:text/html,"); + + // Close browser + await browser.close(); +}); + +Deno.test("Accepting prompt", async () => { + // Launch browser + const browser = await launch(); + + // Open the webpage + const page = await browser.newPage(); + + // listen for dialog events + page.addEventListener("dialog", async (e) => { + const dialog = e.detail; + + assertEquals(dialog.message, "Please type your username"); + assertEquals(dialog.type, "prompt"); + + await dialog.accept("John Doe"); + }); + + // navigate to a page with an alert + await page.goto( + "data:text/html,", + ); + + // Close browser + await browser.close(); +}); + +Deno.test("Declining comfirm", async () => { + // Launch browser + const browser = await launch(); + + // Open the webpage + const page = await browser.newPage(); + + // listen for dialog events + page.addEventListener("dialog", async (e) => { + const dialog = e.detail; + + assertEquals(dialog.message, "Is this good?"); + assertEquals(dialog.type, "confirm"); + + await dialog.dismiss(); + }); + + // navigate to a page with an alert + await page.goto("data:text/html,"); + + // Close browser + await browser.close(); +});