forked from NativeScript/NativeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevtools-elements.d.ts
More file actions
23 lines (18 loc) · 1.04 KB
/
Copy pathdevtools-elements.d.ts
File metadata and controls
23 lines (18 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { DOMNode } from "./dom-node";
export interface InspectorCommands {
// DevTools -> Application communication. Methods that devtools calls when needed.
getDocument(): string | DOMNode;
removeNode(nodeId: number): void;
getComputedStylesForNode(nodeId: number): string | Array<{ name: string, value: string }>;
setAttributeAsText(nodeId: number, text: string, name: string): void;
}
export interface InspectorEvents {
// Application -> DevTools communication. Methods that the app should call when needed.
childNodeInserted(parentId: number, lastId: number, node: DOMNode): void;
childNodeRemoved(parentId: number, nodeId: number): void;
attributeModified(nodeId: number, attrName: string, attrValue: string): void;
attributeRemoved(nodeId: number, attrName: string): void;
}
export function attachDOMInspectorEventCallbacks(inspector: InspectorEvents);
export function attachDOMInspectorCommandCallbacks(inspector: InspectorCommands);
export function attachCSSInspectorCommandCallbacks(inspector: InspectorCommands);