htmx (also stylized as HTMX) is an open-source front-end JavaScript library that extends HTML with custom attributes that enable the use of AJAX directly in HTML and with a hypermedia-driven approach. These attributes allow for the dynamic definition of a web page directly in HTML and CSS, without the need for writing additional JavaScript. These attributes allows tasks that traditionally required writing JavaScript to be done completely with HTML. The library was created by Carson Gross as a new version of intercooler.js.
Why should only and be able to make HTTP requests? Why should only click & submit events trigger them? Why should only GET & POST be available? Why should you only be able to replace the entire screen? To develop htmx locally, you will need to install the development dependencies. At this point you can modify /src/htmx.js to add features, and then add tests in the appropriate area under /test . /test/index.html - the root test page from which all other tests are included /test/attributes - attribute specific tests /test/core - core functionality tests /test/core/regressions.js - regression tests /test/ext - extension tests /test/manual - manual tests that cannot be automated htmx uses the mocha testing framework, the chai assertion framework and sinon to mock out AJAX requests. They are all OK.
Excerpt from the source-code README · 3,890 chars · not written by Vinony
~6 min read
htmx (also stylized as HTMX) is an open-source front-end JavaScript library that extends HTML with custom attributes that enable the use of AJAX directly in HTML and with a hypermedia-driven approach. These attributes allow for the dynamic definition of a web page directly in HTML and CSS, without the need for writing additional JavaScript. These attributes allows tasks that traditionally required writing JavaScript to be done completely with HTML. The library was created by Carson Gross as a new version of intercooler.js.
The library supports communication with the server using standard HTTP methods and simplifies inserting server responses (usually text or HTML fragments) into designated parts of the web page without having to redraw the entire page. This in turn allows for similar behavior to what can be achieved with reconciliation behavior in virtual DOMs.
via Wikidata · CC0
Discovered by embedding cosine similarity (sentence-transformers MiniLM, 384-dim).