diff --git a/lib/hyperscript/compiler.sx b/lib/hyperscript/compiler.sx index 093633af..2fbe7335 100644 --- a/lib/hyperscript/compiler.sx +++ b/lib/hyperscript/compiler.sx @@ -150,7 +150,16 @@ (hs-to-sx obj-ast) (nth prop-ast 1) value) - (list (quote set!) (hs-to-sx target) value)))))) + (if + (and + (list? prop-ast) + (= (first prop-ast) (quote style))) + (list + (quote dom-set-style) + (hs-to-sx obj-ast) + (nth prop-ast 1) + value) + (list (quote set!) (hs-to-sx target) value))))))) (true (list (quote set!) (hs-to-sx target) value))))))) (define emit-on diff --git a/shared/static/wasm/sx/hs-compiler.sx b/shared/static/wasm/sx/hs-compiler.sx index 093633af..2fbe7335 100644 --- a/shared/static/wasm/sx/hs-compiler.sx +++ b/shared/static/wasm/sx/hs-compiler.sx @@ -150,7 +150,16 @@ (hs-to-sx obj-ast) (nth prop-ast 1) value) - (list (quote set!) (hs-to-sx target) value)))))) + (if + (and + (list? prop-ast) + (= (first prop-ast) (quote style))) + (list + (quote dom-set-style) + (hs-to-sx obj-ast) + (nth prop-ast 1) + value) + (list (quote set!) (hs-to-sx target) value))))))) (true (list (quote set!) (hs-to-sx target) value))))))) (define emit-on