getting started
-
bitty is loaded from a
<script>tag. -
it uses a
data-connectattribute to connect to a JavaScript module. -
elements with
data-sattributes send signals. -
elements with
data-rattributes receive signals.get the time waiting -
the module exports an empty `b` object for the connection to bitty.
-
signals are handled by module functions with the same name.
; -
for example, the code above produces this button you can use to get the time:
waiting
native events and elements
-
functions receive three arguments:
the event that triggered the signal.
the element with the
data-sattribute that sent the signal.the element with the
data-rattribute receiving the signal.
For example:
get signal details waiting;waiting
next steps
-
that's all you need to get started.
-
check out the documentation for a full list of features.
-
there are also examples.