Dom tree navigator.
https://luna.liriliri.io/?path=/story/dom-viewer
Add the following script and style to your page.
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/luna-dom-viewer/luna-dom-viewer.css" />
<script src="//cdn.jsdelivr.net/npm/luna-dom-viewer/luna-dom-viewer.js"></script>
You can also get it on npm.
npm install luna-dom-viewer --save
import 'luna-dom-viewer/luna-dom-viewer.css'
import LunaDomViewer from 'luna-dom-viewer'
const container = document.getElementById('container')
const domViewer = new LunaDomViewer(container)
domViewer.expand()
- hotkey(boolean): Enable hotkey.
- ignore(AnyFn): Predicate function which removes the matching child nodes.
- node(ChildNode): Html element to navigate.
Select given node.