aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/component.client.moon1
-rw-r--r--lib/dom.client.moon1
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/component.client.moon b/lib/component.client.moon
index 617deb5..7357f50 100644
--- a/lib/component.client.moon
+++ b/lib/component.client.moon
@@ -93,6 +93,7 @@ class ReactiveElement
for unsub in *@_subscriptions do unsub!
set: (attr, value) =>
+ attr = 'className' if attr == 'class'
if 'table' == (type value) and ReactiveVar.isinstance value
table.insert @_subscriptions, value\subscribe (...) -> @set attr, ...
value = value\get!
diff --git a/lib/dom.client.moon b/lib/dom.client.moon
index b8f2bd5..a5a319b 100644
--- a/lib/dom.client.moon
+++ b/lib/dom.client.moon
@@ -10,6 +10,7 @@ element = (element) -> (...) ->
with e = document\createElement element
for k,v in pairs attributes
+ k = 'className' if k == 'class'
if k == 'style' and 'table' == type v
for kk,vv in pairs v
e.style[kk] = vv