Type Editor / @type-editor/menu / util/set-class / setClass
Function: setClass()
ts
function setClass(dom, cls, on): void;Defined in: packages/menu/src/util/set-class.ts:9
Conditionally adds or removes a CSS class from an element.
Parameters
| Parameter | Type | Description |
|---|---|---|
dom | HTMLElement | The HTML element to modify |
cls | string | The CSS class name to add or remove |
on | boolean | If true, adds the class; if false, removes it |
Returns
void