Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 2x 2x 2x 2x 2x 2x 2x 142x 142x 142x 142x 36x 36x 106x 106x 106x 106x 142x 10x 142x 96x 96x 142x | /**
* @param {HTMLElement} dom
* @param {string} key
* @param {string} value
* @param {boolean} [important]
*/
export function set_style(dom, key, value, important) {
// @ts-expect-error
var attributes = (dom.__attributes ??= {});
if (attributes['style-' + key] === value) {
return;
}
attributes['style-' + key] = value;
var style = dom.style;
if (value == null) {
style.removeProperty(key);
} else {
style.setProperty(key, value, important ? 'important' : '');
}
}
|