From 50f160f897e04b9b122b3f17077c92ac0bb23732 Mon Sep 17 00:00:00 2001 From: s-ol Date: Sat, 27 Oct 2018 03:25:31 +1100 Subject: allow style props in html.client --- lib/html.client.moon | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/html.client.moon') diff --git a/lib/html.client.moon b/lib/html.client.moon index eb4d7fe..b8f2bd5 100644 --- a/lib/html.client.moon +++ b/lib/html.client.moon @@ -10,7 +10,10 @@ element = (element) -> (...) -> with e = document\createElement element for k,v in pairs attributes - if 'string' == type k + if k == 'style' and 'table' == type v + for kk,vv in pairs v + e.style[kk] = vv + elseif 'string' == type k e[k] = v -- if there is only one argument, -- cgit v1.2.3