Files
SnowLuma/.pnpm-store/v11/files/fe/c193ac3fcac745081116b7eff1130e61cf7aec0323fdc474ced2bd98d5af78f52a7f8cfd0a325a9d3082662ec2be2dd0b8ef30d822ac6a23de61bf35aee69c
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

19 lines
675 B
Plaintext

function renderHTML(element, { style, vars }, styleProp, projection) {
const elementStyle = element.style;
let key;
for (key in style) {
// CSSStyleDeclaration has [index: number]: string; in the types, so we use that as key type.
elementStyle[key] = style[key];
}
// Write projection styles directly to element style
projection?.applyProjectionStyles(elementStyle, styleProp);
for (key in vars) {
// Loop over any CSS variables and assign those.
// They can only be assigned using `setProperty`.
elementStyle.setProperty(key, vars[key]);
}
}
export { renderHTML };
//# sourceMappingURL=render.mjs.map