keen/js/dom

Source
node alias js-any
Represents a DOM node.
create-node js-any(tag-name symbol) js
Create a new DOM node with the given tag.
create-node js-any(tag-name symbol, attr string[symbol]) js
Create a new node with the given tag and HTML attributes.
create-node js-any(tag-name symbol, attr string[symbol], class-name string option, children js-any[]) js
create-button js-any(title string, class-name string, children js-any[], on-click void mut(void)) js
style record
node js-any
set-subscript void(a style, key symbol, value string) js
~~= void(a style, properties string[symbol]) js
classes record
node js-any
~= void(a classes, class-name string) js
-= void(a classes, class-name string) js
set-classes void(a js-any, class-names string[]) js
toggle void(a classes, class-name string) js
subscript bool(a classes, class-name string) js
set-subscript void(a classes, class-name string, value bool) js
text-content string(a js-any) unsafe, js
set-text-content void(a js-any, text string) js
add-event-listener void(a js-any, event-name string, fn void mut(js-any)) js
create-input-text js-any(on-input void mut(js-any), value string) js
create-div js-any() js
create-div js-any(class-name string) js
create-div js-any(class-name string, children js-any[]) js
create-span js-any(children js-any[]) js
create-span js-any(class-name string, children js-any[]) js
create-span js-any(class-name string, attr string[symbol], children js-any[]) js
create-text-node js-any(text string) js
document js-any() global, js
is-text-node bool(a js-any) js
attributes record
node js-any
subscript string option(a attributes, attr-name symbol) js
set-subscript void(a attributes, attr-name symbol, value string) js
-= void(a attributes, attr-name symbol) js
~~= void(a attributes, attributes string[symbol]) js
value string(a js-any) js
Gets the value for an input node, or "" if it's not an input node.
set-value void(a js-any, value string) js
You can set a 'value' on any node, but it will only make a visual difference for input nodes.
query js-any option(parent js-any, selector string) js
Calls 'querySelector'
query-all js-any[](parent js-any, selector string) js
child-nodes js-any[](a js-any) js
element js-any option(parent js-any, id string) js
Calls 'getElementById'
first-child js-any option(a js-any) js
on-click void(a js-any, fn void mut(void)) global, js
on-mouse-down void(a js-any, fn void mut(void)) global, js
on-mouse-up void(a js-any, fn void mut(void)) global, js
id string(a js-any) js
set-id void(a js-any, value string) js
~= void(a js-any, b js-any) js
Append a child node.
~~= void(a js-any, b js-any[]) js
Append many child nodes.
set-children void(a js-any, children js-any[]) js
Overwrites any existing child nodes.
remove-all-children void(a js-any) js
remove-self void(a js-any) js
custom-element-options record
styles string[]
new custom-element-options(style string)
define-custom-element void(element-name string, connected void mut(custom-element-node)) global, js
define-custom-element void(element-name string, options custom-element-options, connected void mut(custom-element-node)) global, js
connected-callback alias void mut(custom-element-node)
custom-element-node record
dummy js-any
as-js js-any(a custom-element-node) js, unsafe
as-custom-element-node custom-element-node(a js-any) js, unsafe
as-node js-any(a custom-element-node) js
attributes attributes(a custom-element-node) js
shadow-root js-any(a custom-element-node) js
wait-until-window-loaded void() global, js