Index

SearchNode

MMO.core · 1 symbol · generated 5 Oct 2026

class

SearchNode

HTMLSearch.js:63
class MMO.core.SearchNode
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

clearHighlight()

HTMLSearch.js:73

Remove every <mark> this node added, merging the text back together.

clearHighlight()

highlight(words)

HTMLSearch.js:101

Wrap the best match of each searched word in a <mark>, and score the node as a whole.

highlight(words)
wordsArray<string>the searched words, normalised
returnsnumberthe relevance in [0,1]

update()

HTMLSearch.js:162

Re-tokenise the node's text. Call it whenever its content changed.

update()