MCPcopy
hub / github.com/dolphin-wood/smooth-scrollbar / setStyle

Function setStyle

src/utils/set-style.ts:32–39  ·  view source on GitHub ↗
(elem: HTMLElement, styles: any)

Source from the content-addressed store, hash-verified

30}
31
32export function setStyle(elem: HTMLElement, styles: any) {
33 styles = autoPrefix(styles);
34
35 Object.keys(styles).forEach((prop) => {
36 const cssProp = prop.replace(/^-/, '').replace(/-([a-z])/g, (_, $1) => $1.toUpperCase());
37 elem.style[cssProp] = styles[prop];
38 });
39}

Callers 9

constructorMethod · 0.90
destroyMethod · 0.90
updateMethod · 0.90
updateMethod · 0.90
setPositionFunction · 0.90
mouseHandlerFunction · 0.90
renderMethod · 0.90
constructorMethod · 0.90
renderMethod · 0.90

Calls 1

autoPrefixFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…