npm.io
1.2.1 • Published 3 years ago

@devtools-ds/dom-inspector

Licence
MIT
Version
1.2.1
Deps
5
Size
58 kB
Vulns
1
Weekly
0
Stars
271

@devtools-ds/dom-inspector

An emulation of the Chrome and Firefox DOM inspector, built on the @devtools-ds/tree component.

Installation

npm i @devtools-ds/dom-inspector
# or with yarn
yarn add @devtools-ds/dom-inspector

Usage

import { DOMInspector } from "@devtools-ds/dom-inspector";
const div = document.createElement("div");
const html = `
      <!--This is a comment-->
      <span>A span</span>
      <button type="submit" class="btn">Submit</button>
`;
div.insertAdjacentHTML("beforeend", html);

export const Custom = () => <DOMInspector data={div} expandLevel={2} />;

Useful References

Contributors

Thanks goes to these wonderful people (emoji key):


Tyler Krupicka

This project follows the all-contributors specification. Contributions of any kind welcome!