diff options
Diffstat (limited to 'src/html')
| -rw-r--r-- | src/html/dom.nim | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/html/dom.nim b/src/html/dom.nim index 17f32890..b06a1d04 100644 --- a/src/html/dom.nim +++ b/src/html/dom.nim @@ -3871,13 +3871,9 @@ proc getComputedStyle*(element: Element): CSSStyleDeclaration = if element.cachedComputedStyle == nil: var s = "" for p in CSSPropertyType: - if p != cptNone: - s &= $p & ':' - if p.isBit: - s &= element.computed.bits[p].serialize(valueType(p)) - else: - s &= element.computed.objs[p].serialize() - s &= ';' + s &= $p & ':' + s &= element.computed.serialize(p) + s &= ';' element.cachedComputedStyle = newCSSStyleDeclaration(element, move(s)) element.cachedComputedStyle.computed = true element.cachedComputedStyle.readonly = true |