hawm
(Hawm)
September 26, 2023, 12:22pm
16
debounceFunction
delay calling the target method until the debounce period has elapsed with no additional debounce calls, it sometimes won’t work may still because
debounce
may not be the solution in your use case
Have a try to use the afterAdopt
options
}
/**
* Used for decorating the `cooked` content of a post after it is rendered
*
* `callback` will be called when it is time to decorate with an DOM node.
*
* Use `options.onlyStream` if you only want to decorate posts within a topic,
* and not in other places like the user stream.
*
* Decoration normally happens in a detached DOM. Use `options.afterAdopt`
* to decorate html content after it is adopted by the main `document`.
*
* For example, to add a yellow background to all posts you could do this:
*
* ```
* api.decorateCookedElement(
* elem => { elem.style.backgroundColor = 'yellow' }
* );
* ```
**/
1 Like