Files
NativeScript/nativescript-core/debugger/devtools-elements-interfaces.ts
Martin Yankov 0ffc790d82 chore: remove critical circular dependencies (#8114)
* chore: remove critical circular dependencies

* chore: fix tslint errors

* chore: remove platform specific types from interfaces

* chore: update unit tests polyfills

* fix: incorrect null check

* chore: update api.md file

* test: improve test case

* chore: apply comments

* test: avoid page style leaks in tests
2019-11-28 13:36:34 +02:00

18 lines
830 B
TypeScript

//Types
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;
}