A HTML node will add an empty div to the UI, assign a unique random class name to it and call the callback function when the div is added to the DOM. The calling code can then use this to add any HTML code to the div. Useful for Video embedded, 3D models and other libraries which require a div to be present in the DOM.

Example

const canvas = parent.document.createElement('canvas');

const node = new MEUIHtmlNode((_, __, payload) => {
const { className } = payload as {
className: string;
};

const classSelector = `.${className}`;
const element = parent.document.querySelector(classSelector);
element.style.overflow = "hidden";
element.append(canvas);
});

Index

Interfaces

Type Aliases

Variables

Generated using TypeDoc