aboutsummaryrefslogtreecommitdiffstats
path: root/lib/html.client.moon
diff options
context:
space:
mode:
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