UNPKG

@cloudcome/utils-browser

Version:
19 lines (18 loc) 423 B
import { objectEach } from "@cloudcome/utils-core/object"; function setStyle(el, style) { if (typeof style === "string") { el.style.cssText = style; } else { objectEach(style, (value, key) => { el.style.setProperty(key, value); }); } } function getStyle(el, style) { return window.getComputedStyle(el).getPropertyValue(style); } export { getStyle, setStyle }; //# sourceMappingURL=dom.mjs.map