diff options
| author | bptato <nincsnevem662@gmail.com> | 2025-01-04 15:40:25 +0100 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2025-01-04 15:40:25 +0100 |
| commit | f2623505c787b10e0bd95a6a51b711c4e77e26ed (patch) | |
| tree | 91443fba73c24ca04a56d3eceebf5e8523c85f72 /src/html | |
| parent | 8a51a3e5b7dff6880e5b0f4a3afda1ef8e9bd2fc (diff) | |
| download | chawan-f2623505c787b10e0bd95a6a51b711c4e77e26ed.tar.gz | |
dom: implement cssFloat
Diffstat (limited to 'src/html')
| -rw-r--r-- | src/html/dom.nim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/html/dom.nim b/src/html/dom.nim index 36aadf8e..ebb50060 100644 --- a/src/html/dom.nim +++ b/src/html/dom.nim @@ -3417,6 +3417,8 @@ proc getter(ctx: JSContext; this: CSSStyleDeclaration; atom: JSAtom): var s: string if ctx.fromJS(atom, s).isNone: return JS_EXCEPTION + if s == "cssFloat": + s = "float" if s.isSupportedProperty(): return ctx.toJS(this.getPropertyValue(s)) s = IDLAttributeToCSSProperty(s) @@ -3493,6 +3495,8 @@ proc setter(ctx: JSContext; this: CSSStyleDeclaration; atom: JSAtom; return ok() var name: string ?ctx.fromJS(atom, name) + if name == "cssFloat": + name = "float" return this.setProperty(name, value) proc style*(element: Element): CSSStyleDeclaration {.jsfget.} = |