(el, declaration)
| 224 | * @param {string} [declaration] Styles to apply. |
| 225 | */ |
| 226 | export function applyStyle (el, declaration) { |
| 227 | declaration.split(';').forEach(pair => { |
| 228 | const [property, ...value] = pair.split(':') |
| 229 | if (property && value) { |
| 230 | el.style[property.trim()] = value.join(':') |
| 231 | } |
| 232 | }) |
| 233 | } |
| 234 |
no outgoing calls
no test coverage detected