diff options
Diffstat (limited to 'lib/component.server.moon')
| -rw-r--r-- | lib/component.server.moon | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/component.server.moon b/lib/component.server.moon index 85d97eb..d717ff7 100644 --- a/lib/component.server.moon +++ b/lib/component.server.moon @@ -105,9 +105,14 @@ elements = setmetatable {}, __index: (name) => with val = (...) -> ReactiveElement name, ... @[name] = val +get_or_create = (elem, id, ...) -> + with ReactiveElement elem, ... + \set 'id', id + { :ReactiveVar, :ReactiveElement, + :get_or_create, :tohtml, :flush, :append, |
