function toolTipper(element, contentFunc = (x, y) => "", props = {}) {
const parent = htl.html`<div>`;
Object.assign(parent.style, {
position: "relative",
display: "inline-flex"
});
parent.append(element);
Object.assign(props, {
followCursor: true,
allowHTML: true,
content: contentFunc(0, 0)
});
const instance = tippy(parent, props);
element.onmousemove = element.onmouseenter = (e) => {
instance.setContent(contentFunc(e.offsetX, e.offsetY));
};
return parent;
}