1.4.0 • Published 10 months ago

luna-dom-viewer v1.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Luna Dom Viewer

Dom tree navigator.

Demo

https://luna.liriliri.io/?path=/story/dom-viewer

Install

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'

Usage

const container = document.getElementById('container')
const domViewer = new LunaDomViewer(container)
domViewer.expand()

Configuration

  • hotkey(boolean): Enable hotkey.
  • ignore(AnyFn): Predicate function which removes the matching child nodes.
  • node(ChildNode): Html element to navigate.

Api

select(node?: ChildNode): void

Select given node.

1.4.0

10 months ago

1.3.0

2 years ago

1.2.4

2 years ago

1.2.0

3 years ago

1.1.1

3 years ago

1.0.2

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.1.2

3 years ago

0.1.0

4 years ago