aboutsummaryrefslogtreecommitdiffstats
path: root/lib/html.client.moon
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2018-10-19 04:12:19 +0000
committers-ol <s-ol@users.noreply.github.com>2018-10-19 04:12:19 +0000
commit727f04aac784382e7ecb18b817830d145355b735 (patch)
treebede6333759084b40820dc2c4e364f69d84e48cb /lib/html.client.moon
parentfix all pages (diff)
downloadmmm-727f04aac784382e7ecb18b817830d145355b735.tar.gz
mmm-727f04aac784382e7ecb18b817830d145355b735.zip
switch to self-rendering lua code
Diffstat (limited to 'lib/html.client.moon')
-rw-r--r--lib/html.client.moon5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/html.client.moon b/lib/html.client.moon
index 2538f8d..45794da 100644
--- a/lib/html.client.moon
+++ b/lib/html.client.moon
@@ -1,5 +1,3 @@
-document = js.global.document
-
element = (element) -> (...) ->
children = { ... }
@@ -12,7 +10,8 @@ element = (element) -> (...) ->
with e = document\createElement element
for k,v in pairs attributes
- e[k] = v
+ if 'string' == type k
+ e[k] = v
-- if there is only one argument,
-- children can be in attributes table too