UNPKG

1.33 kBMarkdownView Raw
1[![//_hyperscript](https://hyperscript.org/img/light_logo.png "the underscore is silent")](https://hyperscript.org)
2
3*the underscore is silent*
4
5## introduction
6
7`_hyperscript` is a small, open scripting language inspired by [hypertalk](https://hypercard.org/HyperTalk%20Reference%202.4.pdf)
8
9it is a companion project of <https://htmx.org>
10
11## quickstart
12
13```html
14
15<script src="https://unpkg.com/hyperscript.org@0.9.4"></script>
16
17
18<button _="on click toggle .clicked">
19 Toggle the "clicked" class on me
20</button>
21
22
23<div hs="on mouseOver toggle mouse-over on #foo">
24</div>
25
26<div data-hs="on click call aJavascriptFunction() then
27 wait 10s then
28 call anotherJavascriptFunction()">
29 Do some stuff
30</div>
31```
32
33## website & docs
34
35* <https://hyperscript.org>
36* <https://hyperscript.org/docs>
37
38## contributing
39
40* please include test cases in [`/test`](https://github.com/bigskysoftware/_hyperscript/tree/dev/test) and docs in [`/www`](https://github.com/bigskysoftware/_hyperscript/tree/dev/www)
41 * you can run the test suite by viewing `test/index.html` in a browser.
42* development pull requests should be against the `dev` branch, docs fixes can be made directly against `master`
43* you can build _hyperscript as shown: `npm run dist`. building is not necessary during development to run tests.