fixi
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data ā all from the browser, and deployed in milliseconds.
See https://github.com/bigskysoftware/fixi
0.6.5 release
Include this snippet in your html:
<script type="module" src="https://esm.town/v/wilhelm/fixi"></script>
š² fixi.js - it ain't much...
fixi.js is an experimental, minimalist implementation of generalized hypermedia controls
The fixi api consists of six HTML attributes, nine events & two properties
Here is an example:
<button fx-action="/content" <!-- URL to issue request to --> fx-method="get" <!-- HTTP Method to use --> fx-trigger="click" <!-- Event that triggers the request --> fx-target="#output" <!-- Element to swap --> fx-swap="innerHTML"> <!-- How to swap --> Get Content </button> <output id="output"></output>
When this fixi-powered button is clicked it will issue an HTTP GET request to the /content relative URL and swap the HTML content of the response inside the output tag below it.