SearchNode
MMO.core · 1 symbol · generated 5 Oct 2026
SearchNode
HTMLSearch.js:63- Namespace
MMO.core
Index
| constructor(root) | ||
| clearHighlight() | Remove every <mark> this node added, merging the text back together. | |
| clear() | Drop the highlights AND the tokenised words. | |
| highlight(words) | Wrap the best match of each searched word in a <mark>, and score the node as a whole. | |
| update() | Re-tokenise the node's text. |
Methods5
constructor(root)
HTMLSearch.js:64| root |
clearHighlight()
HTMLSearch.js:73Remove every <mark> this node added, merging the text back together.
clear()
HTMLSearch.js:91Drop the highlights AND the tokenised words.
highlight(words)
HTMLSearch.js:101Wrap the best match of each searched word in a <mark>, and score the node as a whole.
| words | Array<string> | the searched words, normalised |
| returns | number | the relevance in [0,1] |
update()
HTMLSearch.js:162Re-tokenise the node's text. Call it whenever its content changed.