Optional
options: { ignoreMove?: boolean; wrapper?: HTMLElement | (keyof HTMLElementTagNameMap) }Optional
ignoreMove?: booleanIf true, the DOM watcher instances will ignore the operation of replacing the element (so as to not trigger relevant callbacks).
Optional
wrapper?: HTMLElement | (keyof HTMLElementTagNameMap)If it's an element, it is used as the wrapper. If it's a string
tag name, then a new element with this tag is created as the
wrapper. If not given, then div
is used if the element to be
wrapped has an block-display tag, or otherwise span
(if the
element to be wrapped has an inline tag name).
The wrapper element that was either passed in options or created.
Wraps the element in the given wrapper, or a newly created element if not given.