mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Elements tab support for iOS Chrome DevTools (#4930)
* add initial implementation of the dom agent for ios * add implementation of the css agent for ios * refactor devtools inspector methods to somewhat accomodate ios and android patch elements dom-node tests to test for ios too * fix android dom-node test * fix ios dom-node-tests to mock the ios devtools inspector properly * fix: minor changes
This commit is contained in:
23
tns-core-modules/debugger/devtools-elements.d.ts
vendored
Normal file
23
tns-core-modules/debugger/devtools-elements.d.ts
vendored
Normal file
@@ -0,0 +1,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);
|
||||
Reference in New Issue
Block a user