mmo-json-tree
1 symbole · générée le 30 Nov 2026
mmo-json-tree
mmo-json-tree.jhs:1A JSON value shown as a tree: an object or a list folds (a native <details>), each value coloured by its type, every text a text node -- an answer of an API is never html. The value is set from javascript.
- Étend
- CustomShadowElement
Index
| open-depth | how many levels are open at first (2 by default) | |
| value accessor | The value shown | |
| init() | ||
| openAll(open) | Open or fold every level. | |
| draw() | Draw the tree again from the value. | |
| node(key, value, depth) | ||
| scalar(value) |
Attributs1
open-depth
mmo-json-tree.jhshow many levels are open at first (2 by default)
open-depth="2"
Propriétés1
value
accessormmo-json-tree.jhs:22The value shown
- Type
*
Méthodes5
init()
mmo-json-tree.jhs:13openAll(open)
mmo-json-tree.jhs:35Open or fold every level.
| open = true | boolean |
draw()
mmo-json-tree.jhs:40Draw the tree again from the value.
node(key, value, depth)
mmo-json-tree.jhs:52| key | ?string | the key of the value in its parent, null for the root |
| value | * | |
| depth | number | |
| retourne | Node | the value's line, or its folding block |
scalar(value)
mmo-json-tree.jhs:85| value | * | a string, a number, a boolean, null |
| retourne | Node |