mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
Merge pull request #2301 from NativeScript/raikov/webinspector
Updated webinspector interfaces
This commit is contained in:
@ -1,4 +1,5 @@
|
|||||||
declare var __registerDomainDispatcher;
|
declare var __registerDomainDispatcher;
|
||||||
|
declare var __inspectorSendEvent;
|
||||||
export function DomainDispatcher(domain: string): ClassDecorator {
|
export function DomainDispatcher(domain: string): ClassDecorator {
|
||||||
return klass => __registerDomainDispatcher(domain, klass);
|
return klass => __registerDomainDispatcher(domain, klass);
|
||||||
}
|
}
|
||||||
@ -55,13 +56,11 @@ export interface ApplicationCacheDomainDispatcher {
|
|||||||
getApplicationCacheForFrame(params: GetApplicationCacheForFrameMethodArguments): { applicationCache: ApplicationCache };
|
getApplicationCacheForFrame(params: GetApplicationCacheForFrameMethodArguments): { applicationCache: ApplicationCache };
|
||||||
}
|
}
|
||||||
export class ApplicationCacheFrontend {
|
export class ApplicationCacheFrontend {
|
||||||
constructor(private dispatchMessage: (message: String) => void) {
|
|
||||||
}
|
|
||||||
applicationCacheStatusUpdated(frameId: NetworkDomain.FrameId, manifestURL: string, status: number): void {
|
applicationCacheStatusUpdated(frameId: NetworkDomain.FrameId, manifestURL: string, status: number): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "ApplicationCache.applicationCacheStatusUpdated", "params": { "frameId": frameId, "manifestURL": manifestURL, "status": status } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "ApplicationCache.applicationCacheStatusUpdated", "params": { "frameId": frameId, "manifestURL": manifestURL, "status": status } } ));
|
||||||
}
|
}
|
||||||
networkStateUpdated(isNowOnline: boolean): void {
|
networkStateUpdated(isNowOnline: boolean): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "ApplicationCache.networkStateUpdated", "params": { "isNowOnline": isNowOnline } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "ApplicationCache.networkStateUpdated", "params": { "isNowOnline": isNowOnline } } ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -144,6 +143,12 @@ export interface CSSStyleSheetHeader {
|
|||||||
title: string;
|
title: string;
|
||||||
// Denotes whether the stylesheet is disabled.
|
// Denotes whether the stylesheet is disabled.
|
||||||
disabled: boolean;
|
disabled: boolean;
|
||||||
|
// Whether this stylesheet is a <style> tag created by the parser. This is not set for document.written <style> tags.
|
||||||
|
isInline: boolean;
|
||||||
|
// Line offset of the stylesheet within the resource (zero based).
|
||||||
|
startLine: number;
|
||||||
|
// Column offset of the stylesheet within the resource (zero based).
|
||||||
|
startColumn: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CSSStyleSheetBody {
|
export interface CSSStyleSheetBody {
|
||||||
@ -308,8 +313,12 @@ export interface SetRuleSelectorMethodArguments {
|
|||||||
ruleId: CSSRuleId,
|
ruleId: CSSRuleId,
|
||||||
selector: string
|
selector: string
|
||||||
}
|
}
|
||||||
|
export interface CreateStyleSheetMethodArguments {
|
||||||
|
// Identifier of the frame where the new "inspector" stylesheet should be created.
|
||||||
|
frameId: NetworkDomain.FrameId
|
||||||
|
}
|
||||||
export interface AddRuleMethodArguments {
|
export interface AddRuleMethodArguments {
|
||||||
contextNodeId: DOMDomain.NodeId,
|
styleSheetId: StyleSheetId,
|
||||||
selector: string
|
selector: string
|
||||||
}
|
}
|
||||||
export interface ForcePseudoStateMethodArguments {
|
export interface ForcePseudoStateMethodArguments {
|
||||||
@ -345,45 +354,55 @@ export interface CSSDomainDispatcher {
|
|||||||
setStyleText(params: SetStyleTextMethodArguments): { style: CSSStyle };
|
setStyleText(params: SetStyleTextMethodArguments): { style: CSSStyle };
|
||||||
// Modifies the rule selector.
|
// Modifies the rule selector.
|
||||||
setRuleSelector(params: SetRuleSelectorMethodArguments): { rule: CSSRule };
|
setRuleSelector(params: SetRuleSelectorMethodArguments): { rule: CSSRule };
|
||||||
// Creates a new empty rule with the given <code>selector</code> in a special "inspector" stylesheet in the owner document of the context node.
|
// Creates a new special "inspector" stylesheet in the frame with given <code>frameId</code>.
|
||||||
|
createStyleSheet(params: CreateStyleSheetMethodArguments): { styleSheetId: StyleSheetId };
|
||||||
|
// Creates a new empty rule with the given <code>selector</code> in a stylesheet with given <code>styleSheetId</code>.
|
||||||
addRule(params: AddRuleMethodArguments): { rule: CSSRule };
|
addRule(params: AddRuleMethodArguments): { rule: CSSRule };
|
||||||
// Returns all supported CSS property names.
|
// Returns all supported CSS property names.
|
||||||
getSupportedCSSProperties(): { cssProperties: CSSPropertyInfo[] };
|
getSupportedCSSProperties(): { cssProperties: CSSPropertyInfo[] };
|
||||||
|
// Returns all supported system font family names.
|
||||||
|
getSupportedSystemFontFamilyNames(): { fontFamilyNames: string[] };
|
||||||
// Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser.
|
// Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser.
|
||||||
forcePseudoState(params: ForcePseudoStateMethodArguments): void;
|
forcePseudoState(params: ForcePseudoStateMethodArguments): void;
|
||||||
// Returns the Named Flows from the document.
|
// Returns the Named Flows from the document.
|
||||||
getNamedFlowCollection(params: GetNamedFlowCollectionMethodArguments): { namedFlows: NamedFlow[] };
|
getNamedFlowCollection(params: GetNamedFlowCollectionMethodArguments): { namedFlows: NamedFlow[] };
|
||||||
}
|
}
|
||||||
export class CSSFrontend {
|
export class CSSFrontend {
|
||||||
constructor(private dispatchMessage: (message: String) => void) {
|
|
||||||
}
|
|
||||||
// Fires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features.
|
// Fires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features.
|
||||||
mediaQueryResultChanged(): void {
|
mediaQueryResultChanged(): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "CSS.mediaQueryResultChanged", "params": { } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "CSS.mediaQueryResultChanged", "params": { } } ));
|
||||||
}
|
}
|
||||||
// Fired whenever a stylesheet is changed as a result of the client operation.
|
// Fired whenever a stylesheet is changed as a result of the client operation.
|
||||||
styleSheetChanged(styleSheetId: StyleSheetId): void {
|
styleSheetChanged(styleSheetId: StyleSheetId): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "CSS.styleSheetChanged", "params": { "styleSheetId": styleSheetId } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "CSS.styleSheetChanged", "params": { "styleSheetId": styleSheetId } } ));
|
||||||
|
}
|
||||||
|
// Fired whenever an active document stylesheet is added.
|
||||||
|
styleSheetAdded(header: CSSStyleSheetHeader): void {
|
||||||
|
__inspectorSendEvent(JSON.stringify( { "method": "CSS.styleSheetAdded", "params": { "header": header } } ));
|
||||||
|
}
|
||||||
|
// Fired whenever an active document stylesheet is removed.
|
||||||
|
styleSheetRemoved(styleSheetId: StyleSheetId): void {
|
||||||
|
__inspectorSendEvent(JSON.stringify( { "method": "CSS.styleSheetRemoved", "params": { "styleSheetId": styleSheetId } } ));
|
||||||
}
|
}
|
||||||
// Fires when a Named Flow is created.
|
// Fires when a Named Flow is created.
|
||||||
namedFlowCreated(namedFlow: NamedFlow): void {
|
namedFlowCreated(namedFlow: NamedFlow): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "CSS.namedFlowCreated", "params": { "namedFlow": namedFlow } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "CSS.namedFlowCreated", "params": { "namedFlow": namedFlow } } ));
|
||||||
}
|
}
|
||||||
// Fires when a Named Flow is removed: has no associated content nodes and regions.
|
// Fires when a Named Flow is removed: has no associated content nodes and regions.
|
||||||
namedFlowRemoved(documentNodeId: DOMDomain.NodeId, flowName: string): void {
|
namedFlowRemoved(documentNodeId: DOMDomain.NodeId, flowName: string): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "CSS.namedFlowRemoved", "params": { "documentNodeId": documentNodeId, "flowName": flowName } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "CSS.namedFlowRemoved", "params": { "documentNodeId": documentNodeId, "flowName": flowName } } ));
|
||||||
}
|
}
|
||||||
// Fires if any of the regionOverset values changed in a Named Flow's region chain.
|
// Fires if any of the regionOverset values changed in a Named Flow's region chain.
|
||||||
regionOversetChanged(namedFlow: NamedFlow): void {
|
regionOversetChanged(namedFlow: NamedFlow): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "CSS.regionOversetChanged", "params": { "namedFlow": namedFlow } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "CSS.regionOversetChanged", "params": { "namedFlow": namedFlow } } ));
|
||||||
}
|
}
|
||||||
// Fires when a Named Flow's has been registered with a new content node.
|
// Fires when a Named Flow's has been registered with a new content node.
|
||||||
registeredNamedFlowContentElement(documentNodeId: DOMDomain.NodeId, flowName: string, contentNodeId: DOMDomain.NodeId, nextContentNodeId: DOMDomain.NodeId): void {
|
registeredNamedFlowContentElement(documentNodeId: DOMDomain.NodeId, flowName: string, contentNodeId: DOMDomain.NodeId, nextContentNodeId: DOMDomain.NodeId): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "CSS.registeredNamedFlowContentElement", "params": { "documentNodeId": documentNodeId, "flowName": flowName, "contentNodeId": contentNodeId, "nextContentNodeId": nextContentNodeId } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "CSS.registeredNamedFlowContentElement", "params": { "documentNodeId": documentNodeId, "flowName": flowName, "contentNodeId": contentNodeId, "nextContentNodeId": nextContentNodeId } } ));
|
||||||
}
|
}
|
||||||
// Fires when a Named Flow's has been registered with a new content node.
|
// Fires when a Named Flow's has been registered with a new content node.
|
||||||
unregisteredNamedFlowContentElement(documentNodeId: DOMDomain.NodeId, flowName: string, contentNodeId: DOMDomain.NodeId): void {
|
unregisteredNamedFlowContentElement(documentNodeId: DOMDomain.NodeId, flowName: string, contentNodeId: DOMDomain.NodeId): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "CSS.unregisteredNamedFlowContentElement", "params": { "documentNodeId": documentNodeId, "flowName": flowName, "contentNodeId": contentNodeId } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "CSS.unregisteredNamedFlowContentElement", "params": { "documentNodeId": documentNodeId, "flowName": flowName, "contentNodeId": contentNodeId } } ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -433,7 +452,7 @@ export interface SetMonitoringXHREnabledMethodArguments {
|
|||||||
enabled: boolean
|
enabled: boolean
|
||||||
}
|
}
|
||||||
export interface AddInspectedNodeMethodArguments {
|
export interface AddInspectedNodeMethodArguments {
|
||||||
// DOM node id to be accessible by means of $x command line API.
|
// DOM node id to be accessible by means of $0 command line API.
|
||||||
nodeId: DOMDomain.NodeId
|
nodeId: DOMDomain.NodeId
|
||||||
}
|
}
|
||||||
export interface ConsoleDomainDispatcher {
|
export interface ConsoleDomainDispatcher {
|
||||||
@ -445,23 +464,21 @@ export interface ConsoleDomainDispatcher {
|
|||||||
clearMessages(): void;
|
clearMessages(): void;
|
||||||
// Toggles monitoring of XMLHttpRequest. If <code>true</code>, console will receive messages upon each XHR issued.
|
// Toggles monitoring of XMLHttpRequest. If <code>true</code>, console will receive messages upon each XHR issued.
|
||||||
setMonitoringXHREnabled(params: SetMonitoringXHREnabledMethodArguments): void;
|
setMonitoringXHREnabled(params: SetMonitoringXHREnabledMethodArguments): void;
|
||||||
// Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).
|
// Enables console to refer to the node with given id via $0 (see Command Line API for more details).
|
||||||
addInspectedNode(params: AddInspectedNodeMethodArguments): void;
|
addInspectedNode(params: AddInspectedNodeMethodArguments): void;
|
||||||
}
|
}
|
||||||
export class ConsoleFrontend {
|
export class ConsoleFrontend {
|
||||||
constructor(private dispatchMessage: (message: String) => void) {
|
|
||||||
}
|
|
||||||
// Issued when new console message is added.
|
// Issued when new console message is added.
|
||||||
messageAdded(message: ConsoleMessage): void {
|
messageAdded(message: ConsoleMessage): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Console.messageAdded", "params": { "message": message } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Console.messageAdded", "params": { "message": message } } ));
|
||||||
}
|
}
|
||||||
// Issued when subsequent message(s) are equal to the previous one(s).
|
// Issued when subsequent message(s) are equal to the previous one(s).
|
||||||
messageRepeatCountUpdated(count: number): void {
|
messageRepeatCountUpdated(count: number): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Console.messageRepeatCountUpdated", "params": { "count": count } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Console.messageRepeatCountUpdated", "params": { "count": count } } ));
|
||||||
}
|
}
|
||||||
// Issued when console is cleared. This happens either upon <code>clearMessages</code> command or after page navigation.
|
// Issued when console is cleared. This happens either upon <code>clearMessages</code> command or after page navigation.
|
||||||
messagesCleared(): void {
|
messagesCleared(): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Console.messagesCleared", "params": { } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Console.messagesCleared", "params": { } } ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -507,6 +524,8 @@ export interface Node {
|
|||||||
name?: string;
|
name?: string;
|
||||||
// <code>Attr</code>'s value.
|
// <code>Attr</code>'s value.
|
||||||
value?: string;
|
value?: string;
|
||||||
|
// Pseudo element type for this node.
|
||||||
|
pseudoType?: PseudoType;
|
||||||
// Frame ID for frame owner elements.
|
// Frame ID for frame owner elements.
|
||||||
frameId?: NetworkDomain.FrameId;
|
frameId?: NetworkDomain.FrameId;
|
||||||
// Content document for frame owner elements.
|
// Content document for frame owner elements.
|
||||||
@ -515,6 +534,8 @@ export interface Node {
|
|||||||
shadowRoots?: Node[];
|
shadowRoots?: Node[];
|
||||||
// Content document fragment for template elements
|
// Content document fragment for template elements
|
||||||
templateContent?: Node;
|
templateContent?: Node;
|
||||||
|
// Pseudo elements associated with this node.
|
||||||
|
pseudoElements?: Node[];
|
||||||
// Computed value for first recognized role token, default role per element, or overridden role.
|
// Computed value for first recognized role token, default role per element, or overridden role.
|
||||||
role?: string;
|
role?: string;
|
||||||
}
|
}
|
||||||
@ -549,6 +570,8 @@ export interface AccessibilityProperties {
|
|||||||
childNodeIds?: NodeId[];
|
childNodeIds?: NodeId[];
|
||||||
// Array of <code>DOMNode</code> ids of any nodes referenced via @aria-controls.
|
// Array of <code>DOMNode</code> ids of any nodes referenced via @aria-controls.
|
||||||
controlledNodeIds?: NodeId[];
|
controlledNodeIds?: NodeId[];
|
||||||
|
// Current item within a container or set of related elements.
|
||||||
|
current?: any /* true,false,page,step,location,date,time */;
|
||||||
// Disabled state of form controls.
|
// Disabled state of form controls.
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
// Indicates whether there is an existing AX object for the DOM node. If this is false, all the other properties will be default values.
|
// Indicates whether there is an existing AX object for the DOM node. If this is false, all the other properties will be default values.
|
||||||
@ -621,6 +644,8 @@ export interface HighlightConfig {
|
|||||||
marginColor?: RGBAColor;
|
marginColor?: RGBAColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const enum PseudoType { Before, After };
|
||||||
|
|
||||||
export const enum LiveRegionRelevant { Additions, Removals, Text };
|
export const enum LiveRegionRelevant { Additions, Removals, Text };
|
||||||
|
|
||||||
export interface RequestChildNodesMethodArguments {
|
export interface RequestChildNodesMethodArguments {
|
||||||
@ -884,51 +909,57 @@ export interface DOMDomainDispatcher {
|
|||||||
focus(params: FocusMethodArguments): void;
|
focus(params: FocusMethodArguments): void;
|
||||||
}
|
}
|
||||||
export class DOMFrontend {
|
export class DOMFrontend {
|
||||||
constructor(private dispatchMessage: (message: String) => void) {
|
|
||||||
}
|
|
||||||
// Fired when <code>Document</code> has been totally updated. Node ids are no longer valid.
|
// Fired when <code>Document</code> has been totally updated. Node ids are no longer valid.
|
||||||
documentUpdated(): void {
|
documentUpdated(): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "DOM.documentUpdated", "params": { } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "DOM.documentUpdated", "params": { } } ));
|
||||||
}
|
}
|
||||||
// Fired when backend wants to provide client with the missing DOM structure. This happens upon most of the calls requesting node ids.
|
// Fired when backend wants to provide client with the missing DOM structure. This happens upon most of the calls requesting node ids.
|
||||||
setChildNodes(parentId: NodeId, nodes: Node[]): void {
|
setChildNodes(parentId: NodeId, nodes: Node[]): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "DOM.setChildNodes", "params": { "parentId": parentId, "nodes": nodes } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "DOM.setChildNodes", "params": { "parentId": parentId, "nodes": nodes } } ));
|
||||||
}
|
}
|
||||||
// Fired when <code>Element</code>'s attribute is modified.
|
// Fired when <code>Element</code>'s attribute is modified.
|
||||||
attributeModified(nodeId: NodeId, name: string, value: string): void {
|
attributeModified(nodeId: NodeId, name: string, value: string): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "DOM.attributeModified", "params": { "nodeId": nodeId, "name": name, "value": value } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "DOM.attributeModified", "params": { "nodeId": nodeId, "name": name, "value": value } } ));
|
||||||
}
|
}
|
||||||
// Fired when <code>Element</code>'s attribute is removed.
|
// Fired when <code>Element</code>'s attribute is removed.
|
||||||
attributeRemoved(nodeId: NodeId, name: string): void {
|
attributeRemoved(nodeId: NodeId, name: string): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "DOM.attributeRemoved", "params": { "nodeId": nodeId, "name": name } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "DOM.attributeRemoved", "params": { "nodeId": nodeId, "name": name } } ));
|
||||||
}
|
}
|
||||||
// Fired when <code>Element</code>'s inline style is modified via a CSS property modification.
|
// Fired when <code>Element</code>'s inline style is modified via a CSS property modification.
|
||||||
inlineStyleInvalidated(nodeIds: NodeId[]): void {
|
inlineStyleInvalidated(nodeIds: NodeId[]): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "DOM.inlineStyleInvalidated", "params": { "nodeIds": nodeIds } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "DOM.inlineStyleInvalidated", "params": { "nodeIds": nodeIds } } ));
|
||||||
}
|
}
|
||||||
// Mirrors <code>DOMCharacterDataModified</code> event.
|
// Mirrors <code>DOMCharacterDataModified</code> event.
|
||||||
characterDataModified(nodeId: NodeId, characterData: string): void {
|
characterDataModified(nodeId: NodeId, characterData: string): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "DOM.characterDataModified", "params": { "nodeId": nodeId, "characterData": characterData } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "DOM.characterDataModified", "params": { "nodeId": nodeId, "characterData": characterData } } ));
|
||||||
}
|
}
|
||||||
// Fired when <code>Container</code>'s child node count has changed.
|
// Fired when <code>Container</code>'s child node count has changed.
|
||||||
childNodeCountUpdated(nodeId: NodeId, childNodeCount: number): void {
|
childNodeCountUpdated(nodeId: NodeId, childNodeCount: number): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "DOM.childNodeCountUpdated", "params": { "nodeId": nodeId, "childNodeCount": childNodeCount } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "DOM.childNodeCountUpdated", "params": { "nodeId": nodeId, "childNodeCount": childNodeCount } } ));
|
||||||
}
|
}
|
||||||
// Mirrors <code>DOMNodeInserted</code> event.
|
// Mirrors <code>DOMNodeInserted</code> event.
|
||||||
childNodeInserted(parentNodeId: NodeId, previousNodeId: NodeId, node: Node): void {
|
childNodeInserted(parentNodeId: NodeId, previousNodeId: NodeId, node: Node): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "DOM.childNodeInserted", "params": { "parentNodeId": parentNodeId, "previousNodeId": previousNodeId, "node": node } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "DOM.childNodeInserted", "params": { "parentNodeId": parentNodeId, "previousNodeId": previousNodeId, "node": node } } ));
|
||||||
}
|
}
|
||||||
// Mirrors <code>DOMNodeRemoved</code> event.
|
// Mirrors <code>DOMNodeRemoved</code> event.
|
||||||
childNodeRemoved(parentNodeId: NodeId, nodeId: NodeId): void {
|
childNodeRemoved(parentNodeId: NodeId, nodeId: NodeId): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "DOM.childNodeRemoved", "params": { "parentNodeId": parentNodeId, "nodeId": nodeId } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "DOM.childNodeRemoved", "params": { "parentNodeId": parentNodeId, "nodeId": nodeId } } ));
|
||||||
}
|
}
|
||||||
// Called when shadow root is pushed into the element.
|
// Called when shadow root is pushed into the element.
|
||||||
shadowRootPushed(hostId: NodeId, root: Node): void {
|
shadowRootPushed(hostId: NodeId, root: Node): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "DOM.shadowRootPushed", "params": { "hostId": hostId, "root": root } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "DOM.shadowRootPushed", "params": { "hostId": hostId, "root": root } } ));
|
||||||
}
|
}
|
||||||
// Called when shadow root is popped from the element.
|
// Called when shadow root is popped from the element.
|
||||||
shadowRootPopped(hostId: NodeId, rootId: NodeId): void {
|
shadowRootPopped(hostId: NodeId, rootId: NodeId): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "DOM.shadowRootPopped", "params": { "hostId": hostId, "rootId": rootId } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "DOM.shadowRootPopped", "params": { "hostId": hostId, "rootId": rootId } } ));
|
||||||
|
}
|
||||||
|
// Called when a pseudo element is added to an element.
|
||||||
|
pseudoElementAdded(parentId: NodeId, pseudoElement: Node): void {
|
||||||
|
__inspectorSendEvent(JSON.stringify( { "method": "DOM.pseudoElementAdded", "params": { "parentId": parentId, "pseudoElement": pseudoElement } } ));
|
||||||
|
}
|
||||||
|
// Called when a pseudo element is removed from an element.
|
||||||
|
pseudoElementRemoved(parentId: NodeId, pseudoElementId: NodeId): void {
|
||||||
|
__inspectorSendEvent(JSON.stringify( { "method": "DOM.pseudoElementRemoved", "params": { "parentId": parentId, "pseudoElementId": pseudoElementId } } ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1028,19 +1059,17 @@ export interface DOMStorageDomainDispatcher {
|
|||||||
removeDOMStorageItem(params: RemoveDOMStorageItemMethodArguments): void;
|
removeDOMStorageItem(params: RemoveDOMStorageItemMethodArguments): void;
|
||||||
}
|
}
|
||||||
export class DOMStorageFrontend {
|
export class DOMStorageFrontend {
|
||||||
constructor(private dispatchMessage: (message: String) => void) {
|
|
||||||
}
|
|
||||||
domStorageItemsCleared(storageId: StorageId): void {
|
domStorageItemsCleared(storageId: StorageId): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "DOMStorage.domStorageItemsCleared", "params": { "storageId": storageId } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "DOMStorage.domStorageItemsCleared", "params": { "storageId": storageId } } ));
|
||||||
}
|
}
|
||||||
domStorageItemRemoved(storageId: StorageId, key: string): void {
|
domStorageItemRemoved(storageId: StorageId, key: string): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "DOMStorage.domStorageItemRemoved", "params": { "storageId": storageId, "key": key } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "DOMStorage.domStorageItemRemoved", "params": { "storageId": storageId, "key": key } } ));
|
||||||
}
|
}
|
||||||
domStorageItemAdded(storageId: StorageId, key: string, newValue: string): void {
|
domStorageItemAdded(storageId: StorageId, key: string, newValue: string): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "DOMStorage.domStorageItemAdded", "params": { "storageId": storageId, "key": key, "newValue": newValue } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "DOMStorage.domStorageItemAdded", "params": { "storageId": storageId, "key": key, "newValue": newValue } } ));
|
||||||
}
|
}
|
||||||
domStorageItemUpdated(storageId: StorageId, key: string, oldValue: string, newValue: string): void {
|
domStorageItemUpdated(storageId: StorageId, key: string, oldValue: string, newValue: string): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "DOMStorage.domStorageItemUpdated", "params": { "storageId": storageId, "key": key, "oldValue": oldValue, "newValue": newValue } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "DOMStorage.domStorageItemUpdated", "params": { "storageId": storageId, "key": key, "oldValue": oldValue, "newValue": newValue } } ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1084,10 +1113,8 @@ export interface DatabaseDomainDispatcher {
|
|||||||
executeSQL(params: ExecuteSQLMethodArguments): { columnNames?: string[], values?: any[], sqlError?: Error };
|
executeSQL(params: ExecuteSQLMethodArguments): { columnNames?: string[], values?: any[], sqlError?: Error };
|
||||||
}
|
}
|
||||||
export class DatabaseFrontend {
|
export class DatabaseFrontend {
|
||||||
constructor(private dispatchMessage: (message: String) => void) {
|
|
||||||
}
|
|
||||||
addDatabase(database: Database): void {
|
addDatabase(database: Database): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Database.addDatabase", "params": { "database": database } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Database.addDatabase", "params": { "database": database } } ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1129,6 +1156,8 @@ export interface BreakpointOptions {
|
|||||||
actions?: BreakpointAction[];
|
actions?: BreakpointAction[];
|
||||||
// Automatically continue after hitting this breakpoint and running actions.
|
// Automatically continue after hitting this breakpoint and running actions.
|
||||||
autoContinue?: boolean;
|
autoContinue?: boolean;
|
||||||
|
// Number of times to ignore this breakpoint, before stopping on the breakpoint and running actions.
|
||||||
|
ignoreCount?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FunctionDetails {
|
export interface FunctionDetails {
|
||||||
@ -1304,39 +1333,37 @@ export interface DebuggerDomainDispatcher {
|
|||||||
setOverlayMessage(params: SetOverlayMessageMethodArguments): void;
|
setOverlayMessage(params: SetOverlayMessageMethodArguments): void;
|
||||||
}
|
}
|
||||||
export class DebuggerFrontend {
|
export class DebuggerFrontend {
|
||||||
constructor(private dispatchMessage: (message: String) => void) {
|
|
||||||
}
|
|
||||||
// Called when global has been cleared and debugger client should reset its state. Happens upon navigation or reload.
|
// Called when global has been cleared and debugger client should reset its state. Happens upon navigation or reload.
|
||||||
globalObjectCleared(): void {
|
globalObjectCleared(): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Debugger.globalObjectCleared", "params": { } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Debugger.globalObjectCleared", "params": { } } ));
|
||||||
}
|
}
|
||||||
// Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
|
// Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
|
||||||
scriptParsed(scriptId: ScriptId, url: string, startLine: number, startColumn: number, endLine: number, endColumn: number, isContentScript?: boolean, sourceMapURL?: string, hasSourceURL?: boolean): void {
|
scriptParsed(scriptId: ScriptId, url: string, startLine: number, startColumn: number, endLine: number, endColumn: number, isContentScript?: boolean, sourceMapURL?: string, hasSourceURL?: boolean): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Debugger.scriptParsed", "params": { "scriptId": scriptId, "url": url, "startLine": startLine, "startColumn": startColumn, "endLine": endLine, "endColumn": endColumn, "isContentScript": isContentScript, "sourceMapURL": sourceMapURL, "hasSourceURL": hasSourceURL } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Debugger.scriptParsed", "params": { "scriptId": scriptId, "url": url, "startLine": startLine, "startColumn": startColumn, "endLine": endLine, "endColumn": endColumn, "isContentScript": isContentScript, "sourceMapURL": sourceMapURL, "hasSourceURL": hasSourceURL } } ));
|
||||||
}
|
}
|
||||||
// Fired when virtual machine fails to parse the script.
|
// Fired when virtual machine fails to parse the script.
|
||||||
scriptFailedToParse(url: string, scriptSource: string, startLine: number, errorLine: number, errorMessage: string): void {
|
scriptFailedToParse(url: string, scriptSource: string, startLine: number, errorLine: number, errorMessage: string): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Debugger.scriptFailedToParse", "params": { "url": url, "scriptSource": scriptSource, "startLine": startLine, "errorLine": errorLine, "errorMessage": errorMessage } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Debugger.scriptFailedToParse", "params": { "url": url, "scriptSource": scriptSource, "startLine": startLine, "errorLine": errorLine, "errorMessage": errorMessage } } ));
|
||||||
}
|
}
|
||||||
// Fired when breakpoint is resolved to an actual script and location.
|
// Fired when breakpoint is resolved to an actual script and location.
|
||||||
breakpointResolved(breakpointId: BreakpointId, location: Location): void {
|
breakpointResolved(breakpointId: BreakpointId, location: Location): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Debugger.breakpointResolved", "params": { "breakpointId": breakpointId, "location": location } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Debugger.breakpointResolved", "params": { "breakpointId": breakpointId, "location": location } } ));
|
||||||
}
|
}
|
||||||
// Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
|
// Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
|
||||||
paused(callFrames: CallFrame[], reason: any /* XHR,DOM,EventListener,exception,assert,CSPViolation,DebuggerStatement,Breakpoint,PauseOnNextStatement,other */, data?: Object): void {
|
paused(callFrames: CallFrame[], reason: any /* XHR,DOM,EventListener,exception,assert,CSPViolation,DebuggerStatement,Breakpoint,PauseOnNextStatement,other */, data?: Object): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Debugger.paused", "params": { "callFrames": callFrames, "reason": reason, "data": data } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Debugger.paused", "params": { "callFrames": callFrames, "reason": reason, "data": data } } ));
|
||||||
}
|
}
|
||||||
// Fired when the virtual machine resumed execution.
|
// Fired when the virtual machine resumed execution.
|
||||||
resumed(): void {
|
resumed(): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Debugger.resumed", "params": { } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Debugger.resumed", "params": { } } ));
|
||||||
}
|
}
|
||||||
// Fires when a new probe sample is collected.
|
// Fires when a new probe sample is collected.
|
||||||
didSampleProbe(sample: ProbeSample): void {
|
didSampleProbe(sample: ProbeSample): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Debugger.didSampleProbe", "params": { "sample": sample } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Debugger.didSampleProbe", "params": { "sample": sample } } ));
|
||||||
}
|
}
|
||||||
// Fired when a "sound" breakpoint action is triggered on a breakpoint.
|
// Fired when a "sound" breakpoint action is triggered on a breakpoint.
|
||||||
playBreakpointActionSound(breakpointActionId: BreakpointActionIdentifier): void {
|
playBreakpointActionSound(breakpointActionId: BreakpointActionIdentifier): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Debugger.playBreakpointActionSound", "params": { "breakpointActionId": breakpointActionId } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Debugger.playBreakpointActionSound", "params": { "breakpointActionId": breakpointActionId } } ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1354,6 +1381,33 @@ export interface SearchMatch {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Heap
|
||||||
|
// Heap domain exposes JavaScript heap attributes and capabilities.
|
||||||
|
export namespace HeapDomain {
|
||||||
|
|
||||||
|
export interface GarbageCollection {
|
||||||
|
// The type of garbage collection.
|
||||||
|
type: any /* full,partial */;
|
||||||
|
startTime: number;
|
||||||
|
endTime: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface HeapDomainDispatcher {
|
||||||
|
// Enables Heap domain events.
|
||||||
|
enable(): void;
|
||||||
|
// Disables Heap domain events.
|
||||||
|
disable(): void;
|
||||||
|
// Trigger a full garbage collection.
|
||||||
|
gc(): void;
|
||||||
|
}
|
||||||
|
export class HeapFrontend {
|
||||||
|
// Information about the garbage collection.
|
||||||
|
garbageCollected(collection: GarbageCollection): void {
|
||||||
|
__inspectorSendEvent(JSON.stringify( { "method": "Heap.garbageCollected", "params": { "collection": collection } } ));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// IndexedDB
|
// IndexedDB
|
||||||
export namespace IndexedDBDomain {
|
export namespace IndexedDBDomain {
|
||||||
|
|
||||||
@ -1492,25 +1546,23 @@ export interface InspectorDomainDispatcher {
|
|||||||
initialized(): void;
|
initialized(): void;
|
||||||
}
|
}
|
||||||
export class InspectorFrontend {
|
export class InspectorFrontend {
|
||||||
constructor(private dispatchMessage: (message: String) => void) {
|
|
||||||
}
|
|
||||||
evaluateForTestInFrontend(script: string): void {
|
evaluateForTestInFrontend(script: string): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Inspector.evaluateForTestInFrontend", "params": { "script": script } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Inspector.evaluateForTestInFrontend", "params": { "script": script } } ));
|
||||||
}
|
}
|
||||||
inspect(object: RuntimeDomain.RemoteObject, hints: Object): void {
|
inspect(object: RuntimeDomain.RemoteObject, hints: Object): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Inspector.inspect", "params": { "object": object, "hints": hints } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Inspector.inspect", "params": { "object": object, "hints": hints } } ));
|
||||||
}
|
}
|
||||||
// Fired when remote debugging connection is about to be terminated. Contains detach reason.
|
// Fired when remote debugging connection is about to be terminated. Contains detach reason.
|
||||||
detached(reason: string): void {
|
detached(reason: string): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Inspector.detached", "params": { "reason": reason } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Inspector.detached", "params": { "reason": reason } } ));
|
||||||
}
|
}
|
||||||
// Fired when the backend has alternate domains that need to be activated.
|
// Fired when the backend has alternate domains that need to be activated.
|
||||||
activateExtraDomains(domains: string[]): void {
|
activateExtraDomains(domains: string[]): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Inspector.activateExtraDomains", "params": { "domains": domains } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Inspector.activateExtraDomains", "params": { "domains": domains } } ));
|
||||||
}
|
}
|
||||||
// Fired when debugging target has crashed
|
// Fired when debugging target has crashed
|
||||||
targetCrashed(): void {
|
targetCrashed(): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Inspector.targetCrashed", "params": { } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Inspector.targetCrashed", "params": { } } ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1609,6 +1661,8 @@ export interface CompositingReasons {
|
|||||||
perspective?: boolean;
|
perspective?: boolean;
|
||||||
// Composition due to association with an element with a "transform-style: preserve-3d" style.
|
// Composition due to association with an element with a "transform-style: preserve-3d" style.
|
||||||
preserve3D?: boolean;
|
preserve3D?: boolean;
|
||||||
|
// Composition due to association with an element with a "will-change" style.
|
||||||
|
willChange?: boolean;
|
||||||
// Composition due to association with the root element.
|
// Composition due to association with the root element.
|
||||||
root?: boolean;
|
root?: boolean;
|
||||||
// Composition due to association with an element with a "blend-mode" style.
|
// Composition due to association with an element with a "blend-mode" style.
|
||||||
@ -1634,10 +1688,8 @@ export interface LayerTreeDomainDispatcher {
|
|||||||
reasonsForCompositingLayer(params: ReasonsForCompositingLayerMethodArguments): { compositingReasons: CompositingReasons };
|
reasonsForCompositingLayer(params: ReasonsForCompositingLayerMethodArguments): { compositingReasons: CompositingReasons };
|
||||||
}
|
}
|
||||||
export class LayerTreeFrontend {
|
export class LayerTreeFrontend {
|
||||||
constructor(private dispatchMessage: (message: String) => void) {
|
|
||||||
}
|
|
||||||
layerTreeDidChange(): void {
|
layerTreeDidChange(): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "LayerTree.layerTreeDidChange", "params": { } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "LayerTree.layerTreeDidChange", "params": { } } ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1784,77 +1836,67 @@ export interface NetworkDomainDispatcher {
|
|||||||
setExtraHTTPHeaders(params: SetExtraHTTPHeadersMethodArguments): void;
|
setExtraHTTPHeaders(params: SetExtraHTTPHeadersMethodArguments): void;
|
||||||
// Returns content served for the given request.
|
// Returns content served for the given request.
|
||||||
getResponseBody(params: GetResponseBodyMethodArguments): { body: string, base64Encoded: boolean };
|
getResponseBody(params: GetResponseBodyMethodArguments): { body: string, base64Encoded: boolean };
|
||||||
// Tells whether clearing browser cache is supported.
|
|
||||||
canClearBrowserCache(): { result: boolean };
|
|
||||||
// Clears browser cache.
|
|
||||||
clearBrowserCache(): void;
|
|
||||||
// Tells whether clearing browser cookies is supported.
|
|
||||||
canClearBrowserCookies(): { result: boolean };
|
|
||||||
// Clears browser cookies.
|
|
||||||
clearBrowserCookies(): void;
|
|
||||||
// Toggles ignoring cache for each request. If <code>true</code>, cache will not be used.
|
// Toggles ignoring cache for each request. If <code>true</code>, cache will not be used.
|
||||||
setCacheDisabled(params: SetCacheDisabledMethodArguments): void;
|
setCacheDisabled(params: SetCacheDisabledMethodArguments): void;
|
||||||
// Loads a resource in the context of a frame on the inspected page without cross origin checks.
|
// Loads a resource in the context of a frame on the inspected page without cross origin checks.
|
||||||
loadResource(params: LoadResourceMethodArguments): { content: string, mimeType: string, status: number };
|
loadResource(params: LoadResourceMethodArguments): { content: string, mimeType: string, status: number };
|
||||||
}
|
}
|
||||||
export class NetworkFrontend {
|
export class NetworkFrontend {
|
||||||
constructor(private dispatchMessage: (message: String) => void) {
|
|
||||||
}
|
|
||||||
// Fired when page is about to send HTTP request.
|
// Fired when page is about to send HTTP request.
|
||||||
requestWillBeSent(requestId: RequestId, frameId: FrameId, loaderId: LoaderId, documentURL: string, request: Request, timestamp: Timestamp, initiator: Initiator, redirectResponse?: Response, type?: PageDomain.ResourceType): void {
|
requestWillBeSent(requestId: RequestId, frameId: FrameId, loaderId: LoaderId, documentURL: string, request: Request, timestamp: Timestamp, initiator: Initiator, redirectResponse?: Response, type?: PageDomain.ResourceType): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Network.requestWillBeSent", "params": { "requestId": requestId, "frameId": frameId, "loaderId": loaderId, "documentURL": documentURL, "request": request, "timestamp": timestamp, "initiator": initiator, "redirectResponse": redirectResponse, "type": type } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Network.requestWillBeSent", "params": { "requestId": requestId, "frameId": frameId, "loaderId": loaderId, "documentURL": documentURL, "request": request, "timestamp": timestamp, "initiator": initiator, "redirectResponse": redirectResponse, "type": type } } ));
|
||||||
}
|
}
|
||||||
// Fired if request ended up loading from cache.
|
// Fired if request ended up loading from cache.
|
||||||
requestServedFromCache(requestId: RequestId): void {
|
requestServedFromCache(requestId: RequestId): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Network.requestServedFromCache", "params": { "requestId": requestId } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Network.requestServedFromCache", "params": { "requestId": requestId } } ));
|
||||||
}
|
}
|
||||||
// Fired when HTTP response is available.
|
// Fired when HTTP response is available.
|
||||||
responseReceived(requestId: RequestId, frameId: FrameId, loaderId: LoaderId, timestamp: Timestamp, type: PageDomain.ResourceType, response: Response): void {
|
responseReceived(requestId: RequestId, frameId: FrameId, loaderId: LoaderId, timestamp: Timestamp, type: PageDomain.ResourceType, response: Response): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Network.responseReceived", "params": { "requestId": requestId, "frameId": frameId, "loaderId": loaderId, "timestamp": timestamp, "type": type, "response": response } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Network.responseReceived", "params": { "requestId": requestId, "frameId": frameId, "loaderId": loaderId, "timestamp": timestamp, "type": type, "response": response } } ));
|
||||||
}
|
}
|
||||||
// Fired when data chunk was received over the network.
|
// Fired when data chunk was received over the network.
|
||||||
dataReceived(requestId: RequestId, timestamp: Timestamp, dataLength: number, encodedDataLength: number): void {
|
dataReceived(requestId: RequestId, timestamp: Timestamp, dataLength: number, encodedDataLength: number): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Network.dataReceived", "params": { "requestId": requestId, "timestamp": timestamp, "dataLength": dataLength, "encodedDataLength": encodedDataLength } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Network.dataReceived", "params": { "requestId": requestId, "timestamp": timestamp, "dataLength": dataLength, "encodedDataLength": encodedDataLength } } ));
|
||||||
}
|
}
|
||||||
// Fired when HTTP request has finished loading.
|
// Fired when HTTP request has finished loading.
|
||||||
loadingFinished(requestId: RequestId, timestamp: Timestamp, sourceMapURL?: string): void {
|
loadingFinished(requestId: RequestId, timestamp: Timestamp, sourceMapURL?: string): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Network.loadingFinished", "params": { "requestId": requestId, "timestamp": timestamp, "sourceMapURL": sourceMapURL } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Network.loadingFinished", "params": { "requestId": requestId, "timestamp": timestamp, "sourceMapURL": sourceMapURL } } ));
|
||||||
}
|
}
|
||||||
// Fired when HTTP request has failed to load.
|
// Fired when HTTP request has failed to load.
|
||||||
loadingFailed(requestId: RequestId, timestamp: Timestamp, errorText: string, canceled?: boolean): void {
|
loadingFailed(requestId: RequestId, timestamp: Timestamp, errorText: string, canceled?: boolean): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Network.loadingFailed", "params": { "requestId": requestId, "timestamp": timestamp, "errorText": errorText, "canceled": canceled } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Network.loadingFailed", "params": { "requestId": requestId, "timestamp": timestamp, "errorText": errorText, "canceled": canceled } } ));
|
||||||
}
|
}
|
||||||
// Fired when HTTP request has been served from memory cache.
|
// Fired when HTTP request has been served from memory cache.
|
||||||
requestServedFromMemoryCache(requestId: RequestId, frameId: FrameId, loaderId: LoaderId, documentURL: string, timestamp: Timestamp, initiator: Initiator, resource: CachedResource): void {
|
requestServedFromMemoryCache(requestId: RequestId, frameId: FrameId, loaderId: LoaderId, documentURL: string, timestamp: Timestamp, initiator: Initiator, resource: CachedResource): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Network.requestServedFromMemoryCache", "params": { "requestId": requestId, "frameId": frameId, "loaderId": loaderId, "documentURL": documentURL, "timestamp": timestamp, "initiator": initiator, "resource": resource } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Network.requestServedFromMemoryCache", "params": { "requestId": requestId, "frameId": frameId, "loaderId": loaderId, "documentURL": documentURL, "timestamp": timestamp, "initiator": initiator, "resource": resource } } ));
|
||||||
}
|
}
|
||||||
// Fired when WebSocket is about to initiate handshake.
|
// Fired when WebSocket is about to initiate handshake.
|
||||||
webSocketWillSendHandshakeRequest(requestId: RequestId, timestamp: Timestamp, request: WebSocketRequest): void {
|
webSocketWillSendHandshakeRequest(requestId: RequestId, timestamp: Timestamp, request: WebSocketRequest): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Network.webSocketWillSendHandshakeRequest", "params": { "requestId": requestId, "timestamp": timestamp, "request": request } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Network.webSocketWillSendHandshakeRequest", "params": { "requestId": requestId, "timestamp": timestamp, "request": request } } ));
|
||||||
}
|
}
|
||||||
// Fired when WebSocket handshake response becomes available.
|
// Fired when WebSocket handshake response becomes available.
|
||||||
webSocketHandshakeResponseReceived(requestId: RequestId, timestamp: Timestamp, response: WebSocketResponse): void {
|
webSocketHandshakeResponseReceived(requestId: RequestId, timestamp: Timestamp, response: WebSocketResponse): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Network.webSocketHandshakeResponseReceived", "params": { "requestId": requestId, "timestamp": timestamp, "response": response } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Network.webSocketHandshakeResponseReceived", "params": { "requestId": requestId, "timestamp": timestamp, "response": response } } ));
|
||||||
}
|
}
|
||||||
// Fired upon WebSocket creation.
|
// Fired upon WebSocket creation.
|
||||||
webSocketCreated(requestId: RequestId, url: string): void {
|
webSocketCreated(requestId: RequestId, url: string): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Network.webSocketCreated", "params": { "requestId": requestId, "url": url } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Network.webSocketCreated", "params": { "requestId": requestId, "url": url } } ));
|
||||||
}
|
}
|
||||||
// Fired when WebSocket is closed.
|
// Fired when WebSocket is closed.
|
||||||
webSocketClosed(requestId: RequestId, timestamp: Timestamp): void {
|
webSocketClosed(requestId: RequestId, timestamp: Timestamp): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Network.webSocketClosed", "params": { "requestId": requestId, "timestamp": timestamp } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Network.webSocketClosed", "params": { "requestId": requestId, "timestamp": timestamp } } ));
|
||||||
}
|
}
|
||||||
// Fired when WebSocket frame is received.
|
// Fired when WebSocket frame is received.
|
||||||
webSocketFrameReceived(requestId: RequestId, timestamp: Timestamp, response: WebSocketFrame): void {
|
webSocketFrameReceived(requestId: RequestId, timestamp: Timestamp, response: WebSocketFrame): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Network.webSocketFrameReceived", "params": { "requestId": requestId, "timestamp": timestamp, "response": response } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Network.webSocketFrameReceived", "params": { "requestId": requestId, "timestamp": timestamp, "response": response } } ));
|
||||||
}
|
}
|
||||||
// Fired when WebSocket frame error occurs.
|
// Fired when WebSocket frame error occurs.
|
||||||
webSocketFrameError(requestId: RequestId, timestamp: Timestamp, errorMessage: string): void {
|
webSocketFrameError(requestId: RequestId, timestamp: Timestamp, errorMessage: string): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Network.webSocketFrameError", "params": { "requestId": requestId, "timestamp": timestamp, "errorMessage": errorMessage } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Network.webSocketFrameError", "params": { "requestId": requestId, "timestamp": timestamp, "errorMessage": errorMessage } } ));
|
||||||
}
|
}
|
||||||
// Fired when WebSocket frame is sent.
|
// Fired when WebSocket frame is sent.
|
||||||
webSocketFrameSent(requestId: RequestId, timestamp: Timestamp, response: WebSocketFrame): void {
|
webSocketFrameSent(requestId: RequestId, timestamp: Timestamp, response: WebSocketFrame): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Network.webSocketFrameSent", "params": { "requestId": requestId, "timestamp": timestamp, "response": response } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Network.webSocketFrameSent", "params": { "requestId": requestId, "timestamp": timestamp, "response": response } } ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2170,49 +2212,47 @@ export interface PageDomainDispatcher {
|
|||||||
archive(): { data: string };
|
archive(): { data: string };
|
||||||
}
|
}
|
||||||
export class PageFrontend {
|
export class PageFrontend {
|
||||||
constructor(private dispatchMessage: (message: String) => void) {
|
|
||||||
}
|
|
||||||
domContentEventFired(timestamp: number): void {
|
domContentEventFired(timestamp: number): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Page.domContentEventFired", "params": { "timestamp": timestamp } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Page.domContentEventFired", "params": { "timestamp": timestamp } } ));
|
||||||
}
|
}
|
||||||
loadEventFired(timestamp: number): void {
|
loadEventFired(timestamp: number): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Page.loadEventFired", "params": { "timestamp": timestamp } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Page.loadEventFired", "params": { "timestamp": timestamp } } ));
|
||||||
}
|
}
|
||||||
// Fired once navigation of the frame has completed. Frame is now associated with the new loader.
|
// Fired once navigation of the frame has completed. Frame is now associated with the new loader.
|
||||||
frameNavigated(frame: Frame): void {
|
frameNavigated(frame: Frame): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Page.frameNavigated", "params": { "frame": frame } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Page.frameNavigated", "params": { "frame": frame } } ));
|
||||||
}
|
}
|
||||||
// Fired when frame has been detached from its parent.
|
// Fired when frame has been detached from its parent.
|
||||||
frameDetached(frameId: NetworkDomain.FrameId): void {
|
frameDetached(frameId: NetworkDomain.FrameId): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Page.frameDetached", "params": { "frameId": frameId } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Page.frameDetached", "params": { "frameId": frameId } } ));
|
||||||
}
|
}
|
||||||
// Fired when frame has started loading.
|
// Fired when frame has started loading.
|
||||||
frameStartedLoading(frameId: NetworkDomain.FrameId): void {
|
frameStartedLoading(frameId: NetworkDomain.FrameId): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Page.frameStartedLoading", "params": { "frameId": frameId } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Page.frameStartedLoading", "params": { "frameId": frameId } } ));
|
||||||
}
|
}
|
||||||
// Fired when frame has stopped loading.
|
// Fired when frame has stopped loading.
|
||||||
frameStoppedLoading(frameId: NetworkDomain.FrameId): void {
|
frameStoppedLoading(frameId: NetworkDomain.FrameId): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Page.frameStoppedLoading", "params": { "frameId": frameId } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Page.frameStoppedLoading", "params": { "frameId": frameId } } ));
|
||||||
}
|
}
|
||||||
// Fired when frame schedules a potential navigation.
|
// Fired when frame schedules a potential navigation.
|
||||||
frameScheduledNavigation(frameId: NetworkDomain.FrameId, delay: number): void {
|
frameScheduledNavigation(frameId: NetworkDomain.FrameId, delay: number): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Page.frameScheduledNavigation", "params": { "frameId": frameId, "delay": delay } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Page.frameScheduledNavigation", "params": { "frameId": frameId, "delay": delay } } ));
|
||||||
}
|
}
|
||||||
// Fired when frame no longer has a scheduled navigation.
|
// Fired when frame no longer has a scheduled navigation.
|
||||||
frameClearedScheduledNavigation(frameId: NetworkDomain.FrameId): void {
|
frameClearedScheduledNavigation(frameId: NetworkDomain.FrameId): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Page.frameClearedScheduledNavigation", "params": { "frameId": frameId } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Page.frameClearedScheduledNavigation", "params": { "frameId": frameId } } ));
|
||||||
}
|
}
|
||||||
// Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.
|
// Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.
|
||||||
javascriptDialogOpening(message: string): void {
|
javascriptDialogOpening(message: string): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Page.javascriptDialogOpening", "params": { "message": message } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Page.javascriptDialogOpening", "params": { "message": message } } ));
|
||||||
}
|
}
|
||||||
// Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.
|
// Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.
|
||||||
javascriptDialogClosed(): void {
|
javascriptDialogClosed(): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Page.javascriptDialogClosed", "params": { } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Page.javascriptDialogClosed", "params": { } } ));
|
||||||
}
|
}
|
||||||
// Fired when the JavaScript is enabled/disabled on the page
|
// Fired when the JavaScript is enabled/disabled on the page
|
||||||
scriptsEnabled(isEnabled: boolean): void {
|
scriptsEnabled(isEnabled: boolean): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Page.scriptsEnabled", "params": { "isEnabled": isEnabled } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Page.scriptsEnabled", "params": { "isEnabled": isEnabled } } ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2323,71 +2363,69 @@ export interface ReplayDomainDispatcher {
|
|||||||
getSegmentData(params: GetSegmentDataMethodArguments): { segment?: SessionSegment };
|
getSegmentData(params: GetSegmentDataMethodArguments): { segment?: SessionSegment };
|
||||||
}
|
}
|
||||||
export class ReplayFrontend {
|
export class ReplayFrontend {
|
||||||
constructor(private dispatchMessage: (message: String) => void) {
|
|
||||||
}
|
|
||||||
// Fired when capture has started.
|
// Fired when capture has started.
|
||||||
captureStarted(): void {
|
captureStarted(): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Replay.captureStarted", "params": { } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Replay.captureStarted", "params": { } } ));
|
||||||
}
|
}
|
||||||
// Fired when capture has stopped.
|
// Fired when capture has stopped.
|
||||||
captureStopped(): void {
|
captureStopped(): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Replay.captureStopped", "params": { } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Replay.captureStopped", "params": { } } ));
|
||||||
}
|
}
|
||||||
// Playback within the session has progressed up to this position, and is about to replay the input at the specified offset.
|
// Playback within the session has progressed up to this position, and is about to replay the input at the specified offset.
|
||||||
playbackHitPosition(position: ReplayPosition, timestamp: number): void {
|
playbackHitPosition(position: ReplayPosition, timestamp: number): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Replay.playbackHitPosition", "params": { "position": position, "timestamp": timestamp } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Replay.playbackHitPosition", "params": { "position": position, "timestamp": timestamp } } ));
|
||||||
}
|
}
|
||||||
// Fired when session playback has started.
|
// Fired when session playback has started.
|
||||||
playbackStarted(): void {
|
playbackStarted(): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Replay.playbackStarted", "params": { } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Replay.playbackStarted", "params": { } } ));
|
||||||
}
|
}
|
||||||
// Fired when session playback has paused, but not finished.
|
// Fired when session playback has paused, but not finished.
|
||||||
playbackPaused(position: ReplayPosition): void {
|
playbackPaused(position: ReplayPosition): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Replay.playbackPaused", "params": { "position": position } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Replay.playbackPaused", "params": { "position": position } } ));
|
||||||
}
|
}
|
||||||
// Fired when session playback has stopped.
|
// Fired when session playback has stopped.
|
||||||
playbackFinished(): void {
|
playbackFinished(): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Replay.playbackFinished", "params": { } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Replay.playbackFinished", "params": { } } ));
|
||||||
}
|
}
|
||||||
// Fired when the replay controller starts or stops suppressing user inputs.
|
// Fired when the replay controller starts or stops suppressing user inputs.
|
||||||
inputSuppressionChanged(willSuppress: boolean): void {
|
inputSuppressionChanged(willSuppress: boolean): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Replay.inputSuppressionChanged", "params": { "willSuppress": willSuppress } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Replay.inputSuppressionChanged", "params": { "willSuppress": willSuppress } } ));
|
||||||
}
|
}
|
||||||
// Fired when a new replay session is created
|
// Fired when a new replay session is created
|
||||||
sessionCreated(id: SessionIdentifier): void {
|
sessionCreated(id: SessionIdentifier): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Replay.sessionCreated", "params": { "id": id } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Replay.sessionCreated", "params": { "id": id } } ));
|
||||||
}
|
}
|
||||||
// Fired when a session's segments have changed.
|
// Fired when a session's segments have changed.
|
||||||
sessionModified(id: SessionIdentifier): void {
|
sessionModified(id: SessionIdentifier): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Replay.sessionModified", "params": { "id": id } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Replay.sessionModified", "params": { "id": id } } ));
|
||||||
}
|
}
|
||||||
// Fired when a replay session is removed and can no longer be loaded.
|
// Fired when a replay session is removed and can no longer be loaded.
|
||||||
sessionRemoved(id: SessionIdentifier): void {
|
sessionRemoved(id: SessionIdentifier): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Replay.sessionRemoved", "params": { "id": id } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Replay.sessionRemoved", "params": { "id": id } } ));
|
||||||
}
|
}
|
||||||
// Fired when a replay session is loaded.
|
// Fired when a replay session is loaded.
|
||||||
sessionLoaded(id: SessionIdentifier): void {
|
sessionLoaded(id: SessionIdentifier): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Replay.sessionLoaded", "params": { "id": id } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Replay.sessionLoaded", "params": { "id": id } } ));
|
||||||
}
|
}
|
||||||
// Fired when a new session segment is created.
|
// Fired when a new session segment is created.
|
||||||
segmentCreated(id: SegmentIdentifier): void {
|
segmentCreated(id: SegmentIdentifier): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Replay.segmentCreated", "params": { "id": id } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Replay.segmentCreated", "params": { "id": id } } ));
|
||||||
}
|
}
|
||||||
// Fired when a session segment is removed and can no longer be replayed as part of a session.
|
// Fired when a session segment is removed and can no longer be replayed as part of a session.
|
||||||
segmentRemoved(id: SegmentIdentifier): void {
|
segmentRemoved(id: SegmentIdentifier): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Replay.segmentRemoved", "params": { "id": id } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Replay.segmentRemoved", "params": { "id": id } } ));
|
||||||
}
|
}
|
||||||
// Fired when a session segment is completed and can no longer have inputs added to it.
|
// Fired when a session segment is completed and can no longer have inputs added to it.
|
||||||
segmentCompleted(id: SegmentIdentifier): void {
|
segmentCompleted(id: SegmentIdentifier): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Replay.segmentCompleted", "params": { "id": id } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Replay.segmentCompleted", "params": { "id": id } } ));
|
||||||
}
|
}
|
||||||
// Fired when a segment is loaded.
|
// Fired when a segment is loaded.
|
||||||
segmentLoaded(segmentIdentifier: SegmentIdentifier): void {
|
segmentLoaded(segmentIdentifier: SegmentIdentifier): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Replay.segmentLoaded", "params": { "segmentIdentifier": segmentIdentifier } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Replay.segmentLoaded", "params": { "segmentIdentifier": segmentIdentifier } } ));
|
||||||
}
|
}
|
||||||
// Fired when a segment is unloaded.
|
// Fired when a segment is unloaded.
|
||||||
segmentUnloaded(): void {
|
segmentUnloaded(): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Replay.segmentUnloaded", "params": { } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Replay.segmentUnloaded", "params": { } } ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2589,6 +2627,8 @@ export interface BasicBlock {
|
|||||||
endOffset: number;
|
endOffset: number;
|
||||||
// Indicates if the basic block has executed before.
|
// Indicates if the basic block has executed before.
|
||||||
hasExecuted: boolean;
|
hasExecuted: boolean;
|
||||||
|
// Indicates how many times the basic block has executed.
|
||||||
|
executionCount: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const enum SyntaxErrorType { None, Irrecoverable, UnterminatedLiteral, Recoverable };
|
export const enum SyntaxErrorType { None, Irrecoverable, UnterminatedLiteral, Recoverable };
|
||||||
@ -2710,11 +2750,9 @@ export interface RuntimeDomainDispatcher {
|
|||||||
getBasicBlocks(params: GetBasicBlocksMethodArguments): { basicBlocks: BasicBlock[] };
|
getBasicBlocks(params: GetBasicBlocksMethodArguments): { basicBlocks: BasicBlock[] };
|
||||||
}
|
}
|
||||||
export class RuntimeFrontend {
|
export class RuntimeFrontend {
|
||||||
constructor(private dispatchMessage: (message: String) => void) {
|
|
||||||
}
|
|
||||||
// Issued when new execution context is created.
|
// Issued when new execution context is created.
|
||||||
executionContextCreated(context: ExecutionContextDescription): void {
|
executionContextCreated(context: ExecutionContextDescription): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Runtime.executionContextCreated", "params": { "context": context } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Runtime.executionContextCreated", "params": { "context": context } } ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2766,7 +2804,7 @@ export interface CPUProfile {
|
|||||||
idleTime?: number;
|
idleTime?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const enum EventType { EventDispatch, ScheduleStyleRecalculation, RecalculateStyles, InvalidateLayout, Layout, Paint, Composite, RenderingFrame, ScrollLayer, ParseHTML, TimerInstall, TimerRemove, TimerFire, EvaluateScript, MarkLoad, MarkDOMContent, TimeStamp, Time, TimeEnd, XHRReadyStateChange, XHRLoad, FunctionCall, ProbeSample, ConsoleProfile, GCEvent, RequestAnimationFrame, CancelAnimationFrame, FireAnimationFrame, WebSocketCreate, WebSocketSendHandshakeRequest, WebSocketReceiveHandshakeResponse, WebSocketDestroy };
|
export const enum EventType { EventDispatch, ScheduleStyleRecalculation, RecalculateStyles, InvalidateLayout, Layout, Paint, Composite, RenderingFrame, TimerInstall, TimerRemove, TimerFire, EvaluateScript, TimeStamp, Time, TimeEnd, FunctionCall, ProbeSample, ConsoleProfile, RequestAnimationFrame, CancelAnimationFrame, FireAnimationFrame };
|
||||||
|
|
||||||
export interface StartMethodArguments {
|
export interface StartMethodArguments {
|
||||||
// Samples JavaScript stack traces up to <code>maxCallStackDepth</code>, defaults to 5.
|
// Samples JavaScript stack traces up to <code>maxCallStackDepth</code>, defaults to 5.
|
||||||
@ -2779,19 +2817,17 @@ export interface TimelineDomainDispatcher {
|
|||||||
stop(): void;
|
stop(): void;
|
||||||
}
|
}
|
||||||
export class TimelineFrontend {
|
export class TimelineFrontend {
|
||||||
constructor(private dispatchMessage: (message: String) => void) {
|
|
||||||
}
|
|
||||||
// Fired for every instrumentation event while timeline is started.
|
// Fired for every instrumentation event while timeline is started.
|
||||||
eventRecorded(record: TimelineEvent): void {
|
eventRecorded(record: TimelineEvent): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Timeline.eventRecorded", "params": { "record": record } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Timeline.eventRecorded", "params": { "record": record } } ));
|
||||||
}
|
}
|
||||||
// Fired when recording has started.
|
// Fired when recording has started.
|
||||||
recordingStarted(): void {
|
recordingStarted(startTime: number): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Timeline.recordingStarted", "params": { } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Timeline.recordingStarted", "params": { "startTime": startTime } } ));
|
||||||
}
|
}
|
||||||
// Fired when recording has stopped.
|
// Fired when recording has stopped.
|
||||||
recordingStopped(): void {
|
recordingStopped(endTime: number): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Timeline.recordingStopped", "params": { } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Timeline.recordingStopped", "params": { "endTime": endTime } } ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2823,19 +2859,17 @@ export interface WorkerDomainDispatcher {
|
|||||||
setAutoconnectToWorkers(params: SetAutoconnectToWorkersMethodArguments): void;
|
setAutoconnectToWorkers(params: SetAutoconnectToWorkersMethodArguments): void;
|
||||||
}
|
}
|
||||||
export class WorkerFrontend {
|
export class WorkerFrontend {
|
||||||
constructor(private dispatchMessage: (message: String) => void) {
|
|
||||||
}
|
|
||||||
workerCreated(workerId: number, url: string, inspectorConnected: boolean): void {
|
workerCreated(workerId: number, url: string, inspectorConnected: boolean): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Worker.workerCreated", "params": { "workerId": workerId, "url": url, "inspectorConnected": inspectorConnected } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Worker.workerCreated", "params": { "workerId": workerId, "url": url, "inspectorConnected": inspectorConnected } } ));
|
||||||
}
|
}
|
||||||
workerTerminated(workerId: number): void {
|
workerTerminated(workerId: number): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Worker.workerTerminated", "params": { "workerId": workerId } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Worker.workerTerminated", "params": { "workerId": workerId } } ));
|
||||||
}
|
}
|
||||||
dispatchMessageFromWorker(workerId: number, message: Object): void {
|
dispatchMessageFromWorker(workerId: number, message: Object): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Worker.dispatchMessageFromWorker", "params": { "workerId": workerId, "message": message } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Worker.dispatchMessageFromWorker", "params": { "workerId": workerId, "message": message } } ));
|
||||||
}
|
}
|
||||||
disconnectedFromWorker(): void {
|
disconnectedFromWorker(): void {
|
||||||
this.dispatchMessage(JSON.stringify( { "method": "Worker.disconnectedFromWorker", "params": { } } ));
|
__inspectorSendEvent(JSON.stringify( { "method": "Worker.disconnectedFromWorker", "params": { } } ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -116,8 +116,8 @@ export class NetworkDomainDebugger implements inspectorCommandTypes.NetworkDomai
|
|||||||
private _enabled: boolean;
|
private _enabled: boolean;
|
||||||
public events: inspectorCommandTypes.NetworkDomain.NetworkFrontend;
|
public events: inspectorCommandTypes.NetworkDomain.NetworkFrontend;
|
||||||
|
|
||||||
constructor(dispatchMessage: (message: String) => void) {
|
constructor() {
|
||||||
this.events = new inspectorCommands.NetworkDomain.NetworkFrontend(dispatchMessage);
|
this.events = new inspectorCommands.NetworkDomain.NetworkFrontend();
|
||||||
}
|
}
|
||||||
|
|
||||||
get enabled(): boolean {
|
get enabled(): boolean {
|
||||||
|
Reference in New Issue
Block a user