Files
NativeScript/nativescript-core/debugger/devtools-elements.d.ts
Nathan Walker da3c0b973d chore: format
2020-07-11 11:01:40 -07:00

34 lines
1.0 KiB
TypeScript

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
);