Commit Graph

90 Commits

Author SHA1 Message Date
Talia 4621790fbd
Add mechanism for custom built-in elements
Note: Fuck Javascript
2023-09-29 15:09:30 +02:00
Talia 16ac15b7c3
Add explicit empty value to skooma
Optional arguments in skooma can be very annoying at times:

	html.span("foo: ", may_return_undefined())

Skooma will produce a warning to inform the user that one of their
arguments is undefined as is is often unintended.
The new `empty` value provides a mechanism to explicitly ignore a single
argument, should it be optional

	html.span("foo: ", may_return_undefined() || empty)
2023-09-29 15:09:30 +02:00
Talia 9bb5f82302
Add check for null in skooma as well 2023-09-29 15:09:30 +02:00
Talia 0366b3822b
Handle undefined arguments without crashing in skooma 2023-09-29 15:09:30 +02:00
Talia 5f165d1071
Refactor CSS and add "style" function 2023-09-29 15:09:28 +02:00
Talia b40ee8d5b1
Rework skooma.bind function 2023-09-29 15:09:17 +02:00
Talia 0d67ca1f5e
Make skooma/bind more robust 2023-09-29 15:09:09 +02:00
Talia e8d18ae19a
Extend skooma.text function to support template strings 2023-09-29 15:09:09 +02:00
Talia 694b4da6a4
Add current property to skooma bound elements
Elements bound witht he skooma bind function now get a `current`
property patched in.
2023-09-29 15:09:09 +02:00
Talia 60b40e2bc0
Add the skooma bind function 2023-09-29 15:09:09 +02:00
Talia b440eec373
Add text wrapper to skooma.js 2023-09-29 15:09:09 +02:00
Talia 6094fd602d
Add `handle` helper function to skooma 2023-09-29 15:09:09 +02:00
Talia 5687ba9b22
Add more examples to show off skooma's features 2023-09-29 15:09:09 +02:00
Talia caf113a7ae
Write documentation for listener, speaker and skooma 2023-09-29 15:09:09 +02:00
Talia 6f99045d22
Add support for initialisation function to skooma 2023-09-29 15:09:09 +02:00
Talia 4e67cba014
Add special case for dataset to skooma templating 2023-09-29 15:09:08 +02:00
Talia 742eb36035
Remove preventDefault from inline event listeners 2023-09-29 15:09:08 +02:00
Talia 2e1ee0358c
Add prommise support to skooma 2023-09-29 15:09:08 +02:00
Talia f137f8a5b9
Fix typo in skooma 2023-09-29 15:09:08 +02:00
Talia 2ac1e0d4b8
Improve skooma attribute handling 2023-09-29 15:09:08 +02:00
Talia 8454f21c3a
Add skooma style property for setting inline styles 2023-09-29 15:09:08 +02:00
Talia 59f4ba669f
Add `has` metamethod to proxies
This change allows proxies to be used with `with` for easier HTML/SVG
generation.
2023-09-29 15:09:08 +02:00
Talia cb7ad57874
Make name filtering exclusive to HTML nodes 2023-09-29 15:09:08 +02:00
Talia f8db2ca876
Add special shadowRoot semantics 2023-09-29 15:09:08 +02:00
Talia d670416c7a
Prevent default on skooma event listeners 2023-09-29 15:09:08 +02:00
Talia 9f78a9bf14
Add comments documenting what stuff does 2023-09-29 15:09:06 +02:00
Talia 578e965c90
Add event listeners to skooma.js 2023-09-29 15:07:59 +02:00
Talia 9e475b4924
Fix case of hyphenated skooma elements 2023-09-29 15:07:59 +02:00
Talia f0b56c074c
Remove automatic skooma attribute hyphenation 2023-09-29 15:07:59 +02:00
Talia a1677b151f
Update skooma.js to handle numbers 2023-09-29 15:07:59 +02:00
Talia 5a1abac6e8
Fix undefined variable in skooma.js 2023-09-29 15:07:59 +02:00
Talia ada29b303d
Make hyphenation in consistent with browser APIs
Javascript snake-case gets turned into kebab-case in HTML

Change name attribute in example to match
2023-09-29 15:07:57 +02:00
Talia bc251001bc
Fix skooma.js syntax for strict mode 2023-09-29 15:07:48 +02:00
Talia b789242c4c
Extend skooma to support SVG as well as HTML 2023-09-29 15:07:48 +02:00
Talia 4aa9a658b4
Fix checking for template objects in skooma.js 2023-09-29 15:07:48 +02:00
Talia 46864950b2
Remove uppercase node special case from skooma.js 2023-09-29 15:07:48 +02:00
Talia b626076a04
Rename render to skooma.js 2023-09-29 15:07:48 +02:00
Talia 48db8c49f2
Add special case for templates to render script 2023-09-29 15:07:48 +02:00
Talia f740bf3957
Improve HTML render helper 2023-09-29 15:07:48 +02:00
Talia cf4455ca7a
Add skooma-like functional DOM rendering helper 2023-09-29 15:07:48 +02:00