chore: cleanup

This commit is contained in:
Nathan Walker
2020-07-06 14:25:11 -07:00
parent 94cf5c4706
commit 6336eac4b5
477 changed files with 59087 additions and 74961 deletions

View File

@@ -1,50 +1,28 @@
// Types
import {
InspectorEvents,
InspectorCommands,
} from "./devtools-elements-interfaces";
import { InspectorEvents, InspectorCommands } from './devtools-elements-interfaces';
// Requires
import {
getDocument,
getComputedStylesForNode,
removeNode,
setAttributeAsText,
} from "./devtools-elements.common";
import { registerInspectorEvents, DOMNode } from "./dom-node";
import { getDocument, getComputedStylesForNode, removeNode, setAttributeAsText } from './devtools-elements.common';
import { registerInspectorEvents, DOMNode } from './dom-node';
export * from "./devtools-elements-interfaces";
export * from './devtools-elements-interfaces';
export function attachDOMInspectorEventCallbacks(
DOMDomainFrontend: InspectorEvents
) {
registerInspectorEvents(DOMDomainFrontend);
export function attachDOMInspectorEventCallbacks(DOMDomainFrontend: InspectorEvents) {
registerInspectorEvents(DOMDomainFrontend);
const originalChildNodeInserted: (
parentId: number,
lastId: number,
node: string | DOMNode
) => void = DOMDomainFrontend.childNodeInserted;
const originalChildNodeInserted: (parentId: number, lastId: number, node: string | DOMNode) => void = DOMDomainFrontend.childNodeInserted;
DOMDomainFrontend.childNodeInserted = (
parentId: number,
lastId: number,
node: DOMNode
) => {
originalChildNodeInserted(parentId, lastId, node.toObject());
};
DOMDomainFrontend.childNodeInserted = (parentId: number, lastId: number, node: DOMNode) => {
originalChildNodeInserted(parentId, lastId, node.toObject());
};
}
export function attachDOMInspectorCommandCallbacks(
DOMDomainBackend: InspectorCommands
) {
DOMDomainBackend.getDocument = getDocument;
DOMDomainBackend.removeNode = removeNode;
DOMDomainBackend.setAttributeAsText = setAttributeAsText;
export function attachDOMInspectorCommandCallbacks(DOMDomainBackend: InspectorCommands) {
DOMDomainBackend.getDocument = getDocument;
DOMDomainBackend.removeNode = removeNode;
DOMDomainBackend.setAttributeAsText = setAttributeAsText;
}
export function attachCSSInspectorCommandCallbacks(
CSSDomainBackend: InspectorCommands
) {
CSSDomainBackend.getComputedStylesForNode = getComputedStylesForNode;
export function attachCSSInspectorCommandCallbacks(CSSDomainBackend: InspectorCommands) {
CSSDomainBackend.getComputedStylesForNode = getComputedStylesForNode;
}