Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1893 commits
Select commit Hold shift + click to select a range
1a8818c
Dynamically generate talk page
danieljsummers Mar 10, 2023
560b314
Remove reference to Python 2 in README.md (#1321)
pdelboca Mar 13, 2023
09565cd
fix hamburger
1cg Mar 15, 2023
36780c0
bump version
1cg Mar 15, 2023
8570956
Trigger event when a SSE-source is opened
hirschenberger Mar 16, 2023
0ce50f8
Merge branch 'bigskysoftware:master' into gohugo
danieljsummers Mar 18, 2023
53b69c8
Add pub/update dates to essays
danieljsummers Mar 18, 2023
f690d92
Replace www directory
danieljsummers Mar 18, 2023
167c763
Add Netlify deployment settings
danieljsummers Mar 19, 2023
a96189e
another take on generalized event handling w/ and hx-on attribute
1cg Mar 19, 2023
b8ceedd
Added an example project for FastAPI (#1335)
AutomationPanda Mar 28, 2023
5a5ebd7
Add support for "naked" triggers and htmx:trigger event (#1327)
alexpetros Mar 28, 2023
8cd3a48
Nullify unreachable references to dom nodes inside setTimeout(), to a…
croxton Mar 28, 2023
fd87ffd
Experimental support for the [View Transitions API](https://developer…
1cg Mar 28, 2023
44dc325
Merge remote-tracking branch 'origin/dev' into dev
1cg Mar 28, 2023
98c224f
Update hx-target relative positional expressions (#1251)
kijowski Mar 29, 2023
f02a029
Architectural sympathy essay
1cg Mar 30, 2023
2713a3a
Merge branch 'dev' into hx-on-experiment
1cg Mar 31, 2023
b4e6c5c
`hx-on` attribute
1cg Mar 31, 2023
0ae2460
update changelog
1cg Mar 31, 2023
5e12b33
1.9.0 release prep
1cg Mar 31, 2023
39853f0
view transition demo
1cg Mar 31, 2023
afcda98
1.9.0 www stuff
1cg Mar 31, 2023
9a73bdf
formatting
1cg Mar 31, 2023
2a2fc75
formatting
1cg Mar 31, 2023
c11b841
better example
1cg Mar 31, 2023
32edfba
fix
1cg Mar 31, 2023
192df25
Normalize history cache keys - redux (#1338)
croxton Apr 1, 2023
1e1b7cf
escape colons in querySelector (#1314)
Nicals Apr 1, 2023
4883aa8
Merge pull request #1331 from hirschenberger/master
benpate Apr 2, 2023
9c5d228
Test Netlify config
danieljsummers Apr 5, 2023
08b5eae
Restore README for running site
danieljsummers Apr 5, 2023
6cc92bf
fix https://github.com/bigskysoftware/htmx/issues/1348
1cg Apr 5, 2023
7de777d
Merge remote-tracking branch 'origin/dev' into dev
1cg Apr 5, 2023
2fe7545
docs
1cg Apr 5, 2023
b0088a6
Incorporate doc changes in dev branch
danieljsummers Apr 6, 2023
47bdec5
Merge branch 'gohugo' into dev
1cg Apr 6, 2023
b71e3e3
fix up merge
1cg Apr 6, 2023
8fed740
remove 11ty!
1cg Apr 6, 2023
967ba1d
update changelog
1cg Apr 7, 2023
110dd63
two small bug fixes:
1cg Apr 11, 2023
12e62ce
Replaced website search with Google, similar to hyperscript.org. Remo…
gnat Apr 11, 2023
2887a76
update npm deps
1cg Apr 11, 2023
9c251f7
release prep
1cg Apr 11, 2023
2188042
release prep
1cg Apr 11, 2023
f81474f
release prep
1cg Apr 11, 2023
9760e32
update SHA
1cg Apr 11, 2023
56ed569
Merge branch 'master' into dev
1cg Apr 11, 2023
926cfb0
fixes from master
1cg Apr 11, 2023
d1ffd58
fix date
1cg Apr 11, 2023
cb52f71
fix www generation
1cg Apr 11, 2023
ae47c7b
remove old test dir
1cg Apr 11, 2023
9162262
comment www script
1cg Apr 11, 2023
35c70ee
Normalize whitespace in base website HTML template
waldyrious Apr 11, 2023
60a4741
view transitions
1cg Apr 11, 2023
e257cfe
update view transitions link to essay
1cg Apr 11, 2023
8481441
fix typo
1cg Apr 11, 2023
f7cac47
Merge pull request #1364 from waldyrious/normalize-html-template-whit…
dz4k Apr 12, 2023
7a4360f
include github as a sponsor
1cg Apr 12, 2023
e3b66a6
Merge remote-tracking branch 'origin/master'
1cg Apr 12, 2023
67e3446
include github as a sponsor
1cg Apr 12, 2023
30248b9
don't break on narrow views
1cg Apr 13, 2023
360331d
hx-on: Added to Reference page, and revised docs: readability, wordin…
gnat Apr 13, 2023
357e803
fix: readme file logo url (#1375)
gcollazo Apr 13, 2023
afb6537
Update README.md (#1373)
Jak2k Apr 13, 2023
1d79c35
Minor: Fix broken link (404). (#1370)
gnat Apr 13, 2023
84958a8
peak sponsorship
1cg Apr 14, 2023
2313680
Merge remote-tracking branch 'origin/master'
1cg Apr 14, 2023
5ac5587
Added a link to spookylukey/django-htmx-patterns (#1347)
spookylukey Apr 20, 2023
956e840
set an alt
1cg Apr 20, 2023
c421dac
Merge remote-tracking branch 'origin/master'
1cg Apr 20, 2023
a807a5f
bump version
1cg Apr 20, 2023
de45c4a
add awesome-python-htmx to resource list (#1406)
benjamin-kirkbride Apr 25, 2023
43270e3
Add OCaml packages (#1404)
yawaramin Apr 25, 2023
7706eb8
Add link to flask-htmx resource (#1402)
sponsfreixes Apr 25, 2023
70bd741
Missing URL aliases for Locality of Behavior / Behaviour variations. …
gnat Apr 25, 2023
900c5cf
docs: fix repetition in hx-target.md (#1378)
pblkt Apr 25, 2023
3f3faf5
Essay update: Twinspark has changed the address (#1382)
ckald Apr 25, 2023
a93c5dc
Fix link to 3rd party section (#1366)
benji-york Apr 25, 2023
7f8cb74
Update README.md (#1383)
roman-koshchei Apr 25, 2023
fec34cb
prep 1.9.1 release
1cg Apr 26, 2023
d3d5155
play nice w/ other software that uses `window.onpopstate`
1cg Apr 26, 2023
8708fe2
fix bug where naked `hx-trigger`s caused boosted forms w/ explicit `h…
1cg Apr 26, 2023
c98e254
add test for relative indicator definition
1cg Apr 26, 2023
7704d4d
prep 1.9.1 release
1cg Apr 26, 2023
bea31f6
update SHA
1cg Apr 26, 2023
99b33b5
Merge remote-tracking branch 'origin/master' into dev
1cg Apr 26, 2023
6c0aa11
bump to 1.9.2
1cg Apr 28, 2023
9ee51a5
fix https://github.com/bigskysoftware/htmx/issues/1413
1cg Apr 28, 2023
c139d64
prep release
1cg Apr 28, 2023
b4efcba
update sha
1cg Apr 28, 2023
e9017fa
Add PHP section to server-side examples (#1412)
michalsn Apr 28, 2023
990cdd6
Update server-examples.md (#1411)
jhigh2000 Apr 28, 2023
f090fec
remove from posts
1cg Apr 29, 2023
713ea28
Merge remote-tracking branch 'origin/master'
1cg Apr 29, 2023
7e29840
update
1cg Apr 30, 2023
659942c
update essay
1cg Apr 30, 2023
2aa5b89
update essay
1cg May 1, 2023
38bc25f
update essay
1cg May 1, 2023
13dbbcd
update essay
1cg May 1, 2023
de377b0
update essay
1cg May 1, 2023
35efa51
update essay
1cg May 1, 2023
365ec3a
update essay
1cg May 1, 2023
5e170e9
fix typo
1cg May 2, 2023
c96f01e
bump verison + add `this` symbol in filter expressions
1cg May 2, 2023
1d146b1
disallow `hx-on` if `allowEval` is not true
1cg May 2, 2023
f83ad9d
Clean up `inlineScriptNonce` definition
bencroker May 2, 2023
e0c6a45
HOWL essay
1cg May 10, 2023
1ead25f
formatting
1cg May 10, 2023
fc269c2
rewrite
1cg May 11, 2023
658ea65
add banner section
1cg May 11, 2023
327f2d4
Merge remote-tracking branch 'origin/master'
1cg May 11, 2023
6c1104d
Fix spelling of idiomorph (#1434)
joe-no-body May 11, 2023
3a15912
FINE, I WILL MAKE THE DEMOS FAST
1cg May 11, 2023
b8a0f97
Merge remote-tracking branch 'origin/master'
1cg May 11, 2023
d766c14
Missing types 1.8.6 (#1324)
edcohen08 May 11, 2023
e4ffff5
update HOWL essay
1cg May 21, 2023
b66e133
Add Elixir sample to server-examples.md (#1448)
hungle00 May 23, 2023
73f6187
Fix a typo in the description of hx-confirm (#1446)
mic4ael May 23, 2023
e9b9b91
Add "I studied HTML" meme to essays page (#1438)
alexpetros May 23, 2023
a483023
Fix typo in custom modal example (#1429)
Voles May 23, 2023
9bd3e3b
Fix missing a word in the reference (#1422)
May 23, 2023
7fc5ac5
response-targets extension with documentation, exposed 3 functions in…
siefca May 23, 2023
cbdbe1d
Init (#1428)
mozey May 23, 2023
e626e2a
docs: updating attribute table to use beforeend instead of beforeEnd …
paganotoni May 23, 2023
eb91ae4
Add Markupolation samples (#1421)
hlaueriksson May 23, 2023
2bbe363
Allow time for browser to render layout restored from history cache b…
croxton May 23, 2023
b5a01c1
update HOWL essay
1cg May 23, 2023
0688a55
cherry pick HOWL essay to master
1cg May 23, 2023
716b79b
update HOWL essay
1cg May 23, 2023
08ff8cc
Merge remote-tracking branch 'origin/master'
1cg May 23, 2023
df94ba6
images for HOWL essay
1cg May 23, 2023
b509758
improvements
1cg May 24, 2023
f01564b
knock down spacing a bit
1cg May 24, 2023
93fa44d
move lists in to align w/ quotes
1cg May 24, 2023
0192402
rework for easier sponsorship
1cg May 24, 2023
b20bedc
fine
1cg May 24, 2023
8bf945a
fix typo
1cg May 26, 2023
6180ad2
Fix incorrect attribute
bencroker Jun 1, 2023
ae19c18
Merge branch 'master' into dev
1cg Jun 3, 2023
6bc2e17
change language to "RESTless"
1cg Jun 7, 2023
352caec
Merge remote-tracking branch 'origin/master'
1cg Jun 7, 2023
59242a5
accelerator announcement, link HOWL essay
1cg Jun 7, 2023
be1cb53
Include note about 204 in hx-delete docs and examples (#1475)
alexpetros Jun 7, 2023
c8568ea
fix a bug with afterSettle event raised just once after multiple OOB …
Renerick Jun 7, 2023
4d84af4
fix typo in scripting example (#1470)
Renerick Jun 7, 2023
ec90998
Fix link (#1466)
elliottinvent Jun 7, 2023
19f8ee9
fix type in sse event (#1463)
mydnicq Jun 7, 2023
34612f0
Fix relative link to hypermedia-friendly-scripting essay (#1457)
gpshonik Jun 7, 2023
81ead8e
Fix inverted elt / target for sse selectAndSwap (#1483)
Telroshan Jun 7, 2023
108d2b4
Fix WebSocket extension trigger handlers initialization (#1468)
Renerick Jun 7, 2023
adef116
Add support for hx-on:* attribute (#1489)
alexpetros Jun 13, 2023
6e1ed4a
essay
1cg Jun 13, 2023
b4a61c5
Merge remote-tracking branch 'origin/master'
1cg Jun 13, 2023
dd53ca0
Doc - make it clear that `closest` can return the element itself #148…
Telroshan Jun 15, 2023
f39c0be
Include node as 'source' for preload so hx-sync/queue works properly
checketts Jun 13, 2023
081aaf3
Merge pull request #1493 from checketts/preload-source
benpate Jun 20, 2023
fe4a803
Add logNone function and apply it to tests (#1504)
alexpetros Jun 24, 2023
d378877
Fix clearWorkArea test util function (#1507)
alexpetros Jun 24, 2023
336088a
Update podcasts.csv (#1486)
srcerer Jun 24, 2023
714adc4
Encode as URL params for DELETE requests, instead of using body (#1513)
Telroshan Jun 24, 2023
decaecb
rest copypasta
1cg Jun 26, 2023
ed92178
Merge remote-tracking branch 'origin/master'
1cg Jun 26, 2023
84b25cd
fix date
1cg Jun 26, 2023
393b0bb
format
1cg Jun 26, 2023
c9b0444
hyperscript powered copy buttons let's GO
1cg Jun 26, 2023
19e8dec
hyperscript powered copy buttons let's GO
1cg Jun 26, 2023
be8c501
space better
1cg Jun 26, 2023
cf5ecb9
formatting
1cg Jun 26, 2023
983ca32
formatting
1cg Jun 26, 2023
ca03dab
formatting
1cg Jun 26, 2023
4a7e71d
Switch CI to GitHub actions (#1515)
alexpetros Jun 30, 2023
3ff33ea
Add Go/templ example link (#1521)
a-h Jun 30, 2023
1561a7d
Fix sse listener removal if element isn't in body anymore (#1484)
Telroshan Jun 30, 2023
3bca1af
Fix typo in sample HTML response (#1502)
metonym Jun 30, 2023
18aa247
fix accesibility and keyboard navigation issues in examples (#1433)
Renerick Jun 30, 2023
310ca32
Fix typo
bencroker Jun 30, 2023
e923482
Improve wording
bencroker Jun 30, 2023
febfa1c
Add configs to choose between ecoding parameters in the URL or reques…
alexpetros Jul 10, 2023
21f333c
Fix typo (#1556)
yansal Jul 10, 2023
e6fc324
Fix paths mentioned in description text (#1551)
MaxAtoms Jul 10, 2023
8861880
Fix GitHub word capitalization (#1547)
MicaelJarniac Jul 10, 2023
a48d4e3
Add django-template-partials to Python template-fragment implementati…
vsajip Jul 10, 2023
59f5073
fix grammer and typo in Response Headers docs section (#1536)
steverusso Jul 10, 2023
39ffb3a
Group essays by subject (#1543)
alexpetros Jul 10, 2023
0fa4a6a
Add Rust/MiniJinja to template-fragments.md
xSke Jul 14, 2023
4e97877
Merge branch 'master' into dev
1cg Jul 14, 2023
05a1f8c
Merge remote-tracking branch 'origin/dev' into dev
1cg Jul 14, 2023
2edb023
Merge branch 'master' into dev
1cg Jul 14, 2023
ac6839e
htmx 1.9.3 release prep
1cg Jul 14, 2023
ec0c11c
update sha
1cg Jul 14, 2023
3521c3c
Implementation of HX-Reselect (#1385)
RoToRa Jul 14, 2023
1837f1f
Merge remote-tracking branch 'origin/master' into dev
1cg Jul 14, 2023
5c6805a
slide in one change, what could go wrong?
1cg Jul 14, 2023
0a94648
fix date
1cg Jul 14, 2023
c99980f
Fix hx-on:* release notes (#1578)
alexpetros Jul 14, 2023
cc5a2d3
docs: fix link by removing extra parenthesis
emmanuel-ferdman Jul 16, 2023
192157f
Merge pull request #1587 from emmanuel-ferdman/wip
alexpetros Jul 16, 2023
7dbc302
Merge pull request #1570 from xSke/patch-1
alexpetros Jul 16, 2023
8766ad7
Fix markdown format (#1583)
yansal Jul 17, 2023
249a197
Fix beforeProcessNode link (#1562)
Telroshan Jul 17, 2023
fd912f8
Make it clear that `from` with a selector gets all matching elements …
Telroshan Jul 17, 2023
3773828
book announcement
1cg Jul 17, 2023
e33b0be
Merge remote-tracking branch 'origin/master'
1cg Jul 17, 2023
0a471dc
Fix typos in www/ (#1579)
szepeviktor Jul 17, 2023
02399cd
Bump golang.org/x/sys in /www/static/test/1.9.3/test/servers/ws (#1574)
dependabot[bot] Jul 17, 2023
dc7ab96
Bump golang.org/x/net in /www/static/test/1.9.3/test/servers/ws (#1575)
dependabot[bot] Jul 17, 2023
cb184cf
Bump golang.org/x/crypto in /www/static/test/1.9.3/test/servers/ws (#…
dependabot[bot] Jul 17, 2023
90f72e9
Bump github.com/labstack/echo/v4 (#1592)
dependabot[bot] Jul 17, 2023
8893b8c
Bump golang.org/x/sys in /www/static/test/1.9.3/test/realtime (#1593)
dependabot[bot] Jul 17, 2023
ac81746
Bump golang.org/x/net in /www/static/test/1.9.3/test/realtime (#1594)
dependabot[bot] Jul 17, 2023
6336ad6
Bump golang.org/x/crypto in /www/static/test/1.9.3/test/realtime (#1596)
dependabot[bot] Jul 17, 2023
b085d89
Fix assorted comment typos (#1590)
szepeviktor Jul 17, 2023
dff8f33
[Bugfix] Fix ie11 incompatible syntax (#1591)
Telroshan Jul 17, 2023
449fc9d
Remove engine from package.json (#1589)
alexpetros Jul 17, 2023
8bbcc23
Fix: `hx-on` event listener clean-up (#1586)
JackWithOneEye Jul 17, 2023
2534a97
Add JStachio to list of template engines supporting fragments (#1606)
agentgt Jul 18, 2023
f20791c
Add tests for HX Retarget and fix typo (#1600)
matiboy Jul 18, 2023
e89c9c6
[Bugfix] Handle dynamically added hx-disable (#1567)
Telroshan Jul 18, 2023
91d0630
[New feature] Comma separated list syntax for HX-Trigger response hea…
Telroshan Jul 18, 2023
65bd1e1
Fix hx-on:* examples to use kebab-case event names, add clarification…
ElnuDev Jul 18, 2023
4645ab0
Add background-color to body element (#1607)
Djursing Jul 19, 2023
131c025
Update contribution guidelines (#1614)
alexpetros Jul 20, 2023
c59fe79
Update hx-trigger throttle documentation (#1609)
Djursing Jul 20, 2023
a29403f
[Bugfix] Fix references to element.id (#1563)
Telroshan Jul 22, 2023
6d1adc8
[Bugfix] Fix hx-trigger `changed` modifier along `from` clause (#1571)
Telroshan Jul 22, 2023
88a57cb
[Bugfix] Fix submit buttons/inputs handling (#1559)
Telroshan Jul 25, 2023
4cb85e9
Merge remote-tracking branch 'origin/dev' into dev
1cg Jul 25, 2023
f3a6975
prep 1.9.4 release
1cg Jul 25, 2023
6194543
changelog for release
1cg Jul 25, 2023
19cb15c
security improvements
1cg Jul 31, 2023
36e6a42
security improvement
1cg Jul 31, 2023
67b8e1e
Update same site security to use origin (#1656)
adamckay Aug 1, 2023
efb42e0
[Performance] Fast path to resolve body selector (#1545)
Telroshan Aug 1, 2023
193cb67
Cleaner Bootstrap 5 modals example. (#1111)
dekoza Aug 1, 2023
fc4723c
Remove logAll from tests (#1657)
alexpetros Aug 1, 2023
1acbbe5
add test to ensure I don't screw up the `sameHost` value
1cg Aug 4, 2023
14e2a8c
Merge remote-tracking branch 'origin/dev' into dev
1cg Aug 4, 2023
295d9f8
remove a logAll()
1cg Aug 4, 2023
347ce7a
Add interactive check to ready event handler (#1672)
alexpetros Aug 4, 2023
6f647cf
Bump golang.org/x/crypto from 0.0.0-20210322153248-0c34fe9e7dc2 to 0.…
dependabot[bot] Jul 29, 2023
be56555
Bump golang.org/x/net from 0.0.0-20210405180319-a5a99cb37ef4 to 0.7.0…
dependabot[bot] Jul 29, 2023
e4ffec6
Fixed typo in websockets documentation (#1628)
wavpro Jul 29, 2023
761985d
Bump golang.org/x/net from 0.0.0-20211015210444-4f30a5c0130f to 0.7.0…
dependabot[bot] Jul 29, 2023
f3df363
Bump golang.org/x/crypto from 0.0.0-20210817164053-32db794688a5 to 0.…
dependabot[bot] Jul 30, 2023
6d34bc0
Bump github.com/labstack/echo/v4 from 4.3.0 to 4.9.0 in /www/static/t…
dependabot[bot] Jul 30, 2023
c7cd632
Update podcasts.csv (#1530)
srcerer Jul 30, 2023
ad6c4f9
Add date and author to essay template (#1654)
alexpetros Aug 1, 2023
f183b01
Tighten up hx-on docs (#1648)
alexpetros Aug 1, 2023
c9c4706
Support hx-target-5xx syntax in response-targets extension (#1629)
spiffytech Aug 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
19 changes: 0 additions & 19 deletions .circleci/config.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: [1cg]
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Node CI

on:
push:
branches: [ master, dev, htmx-2.0 ]
pull_request:
branches: [ master, dev, htmx-2.0 ]

jobs:
test_suite:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '15.x'
- run: npm ci
- run: npm test
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
.idea
*.iml
/node_modules
_site
test/scratch.html
test/scratch/scratch.html
.DS_Store
.vscode
414 changes: 414 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

91 changes: 75 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,39 @@
[![</> htmx](https://raw.githubusercontent.com/bigskysoftware/htmx/master/www/img/htmx_logo.1.png "high power tools for HTML")](https://htmx.org)
[![</> htmx](https://raw.githubusercontent.com/bigskysoftware/htmx/master/www/static/img/htmx_logo.1.png "high power tools for HTML")](https://htmx.org)

*high power tools for HTML*

[![Gitter](https://img.shields.io/gitter/room/intercooler-js/Lobby.svg)](https://gitter.im/intercooler-js/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Discord](https://img.shields.io/discord/725789699527933952)](https://htmx.org/discord)
[![Netlify](https://img.shields.io/netlify/dba3fc85-d9c9-476a-a35a-e52a632cef78)](https://app.netlify.com/sites/htmx/deploys)
[![Circle CI](https://circleci.com/gh/bigskysoftware/htmx.svg?style=shield)](https://app.circleci.com/pipelines/github/bigskysoftware/htmx)
[![Bundlephobia](https://badgen.net/bundlephobia/dependency-count/htmx.org)](https://bundlephobia.com/result?p=htmx.org)
[![Bundlephobia](https://badgen.net/bundlephobia/minzip/htmx.org)](https://bundlephobia.com/result?p=htmx.org)

## introduction

htmx allows you to access [AJAX](https://htmx.org/docs#ajax),
[WebSockets](https://htmx.org/docs#websockets) and [Server Sent Events](https://htmx.org/docs#sse)
directly in HTML, using [attributes](https://htmx.org/reference#attributes), so you can build
[modern user interfaces](https://htmx.org/examples) with the [simplicity](https://en.wikipedia.org/wiki/HATEOAS) and
htmx allows you to access [AJAX](https://htmx.org/docs#ajax), [CSS Transitions](https://htmx.org/docs#css_transitions),
[WebSockets](https://htmx.org/docs#websockets) and [Server Sent Events](https://htmx.org/docs#sse)
directly in HTML, using [attributes](https://htmx.org/reference#attributes), so you can build
[modern user interfaces](https://htmx.org/examples) with the [simplicity](https://en.wikipedia.org/wiki/HATEOAS) and
[power](https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm) of hypertext

htmx is small ([~7k min.gz'd](https://unpkg.com/htmx.org/dist/)),
htmx is small ([~14k min.gz'd](https://unpkg.com/htmx.org/dist/)),
[dependency-free](https://github.com/bigskysoftware/htmx/blob/master/package.json),
[extendable](https://htmx.org/extensions) &
[extendable](https://htmx.org/extensions) &
IE11 compatible

## motivation

* Why should only `<a>` and `<form>` 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?

By removing these arbitrary constraints htmx completes HTML as a
[hypertext](https://en.wikipedia.org/wiki/Hypertext)

## quick start

```html
<!-- Load from unpkg -->
<script src="https://unpkg.com/htmx.org@0.0.8"></script>
<script src="https://unpkg.com/htmx.org@1.9.4"></script>
<!-- have a button POST a click via AJAX -->
<button hx-post="/clicked" hx-swap="outerHTML">
Click Me
Expand All @@ -36,18 +46,67 @@ The [`hx-post`](https://htmx.org/attributes/hx-post) and [`hx-swap`](https://htm

htmx is the successor to [intercooler.js](http://intercoolerjs.org)

### installing as a node package

To install using npm:

```
npm install htmx.org --save
```

Note there is an old broken package called `htmx`. This is `htmx.org`.

## website & docs

* <https://htmx.org>
* <https://htmx.org/docs>

## contributing

* please write code, including tests, in ES5 for [IE 11 compatibility](https://stackoverflow.com/questions/39902809/support-for-es6-in-internet-explorer-11)
* please include test cases in [`/test`](https://github.com/bigskysoftware/htmx/tree/dev/test) and docs in [`/www`](https://github.com/bigskysoftware/htmx/tree/dev/www)
* if you are adding a feature, consider doing it as an [extension](https://htmx.org/extensions) instead to
keep the core htmx code tidy
* development pull requests should be against the `dev` branch, docs fixes can be made directly against `master`
* All PRs should be made against the `dev` branch, except documentation PRs (`www/` directory) which can be made against `master`
* Please write code, including tests, in ES5 for [IE 11 compatibility](https://stackoverflow.com/questions/39902809/support-for-es6-in-internet-explorer-11)
* Please include test cases in [`/test`](https://github.com/bigskysoftware/htmx/tree/dev/test) and docs in [`/www`](https://github.com/bigskysoftware/htmx/tree/dev/www)
* Search the issues before proposing a feature to see if it is already under discussion
* If you are adding a feature, consider doing it as an [extension](https://htmx.org/extensions) instead to keep the core htmx code tidy
* Want to contribute but don't know where to start? Look for issues with the "help wanted" tag
* Refactors that do not make functional changes will be automatically closed, unless explicitly solicited (documentation typo fixes are fine)
* No time? Then [become a sponsor](https://github.com/sponsors/bigskysoftware#sponsors)

### hacking guide

To develop htmx locally, you will need to install the development dependencies.

__Requires Node 15.__

Run:

```
npm install
```

Then, run a web server in the root.

This is easiest with:

```
npx serve
```

You can then run the test suite by navigating to:

<http://0.0.0.0:3000/test/>

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](https://mochajs.org/) testing framework, the [chai](https://www.chaijs.com/) assertion framework
and [sinon](https://sinonjs.org/releases/v9/fake-xhr-and-server/) to mock out AJAX requests. They are all OK.

## haiku

Expand Down
16 changes: 0 additions & 16 deletions TODO.md

This file was deleted.

16 changes: 16 additions & 0 deletions dist/ext/alpine-morph.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
htmx.defineExtension('alpine-morph', {
isInlineSwap: function (swapStyle) {
return swapStyle === 'morph';
},
handleSwap: function (swapStyle, target, fragment) {
if (swapStyle === 'morph') {
if (fragment.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
Alpine.morph(target, fragment.firstElementChild);
return [target];
} else {
Alpine.morph(target, fragment.outerHTML);
return [target];
}
}
}
});
36 changes: 22 additions & 14 deletions dist/ext/class-tools.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function(){
(function () {

function splitOnWhitespace(trigger) {
return trigger.split(/\s+/);
Expand All @@ -20,15 +20,29 @@
delay = 100;
}
return {
operation:operation,
cssClass:cssClass,
delay:delay
operation: operation,
cssClass: cssClass,
delay: delay
}
} else {
return null;
}
}

function performOperation(elt, classOperation, classList, currentRunTime) {
setTimeout(function () {
elt.classList[classOperation.operation].call(elt.classList, classOperation.cssClass);
}, currentRunTime)
}

function toggleOperation(elt, classOperation, classList, currentRunTime) {
setTimeout(function () {
setInterval(function () {
elt.classList[classOperation.operation].call(elt.classList, classOperation.cssClass);
}, classOperation.delay);
}, currentRunTime)
}

function processClassList(elt, classList) {
var runs = classList.split("&");
for (var i = 0; i < runs.length; i++) {
Expand All @@ -41,17 +55,11 @@
var classOperation = parseClassOperation(trimmedValue);
if (classOperation) {
if (classOperation.operation === "toggle") {
setTimeout(function () {
setInterval(function () {
elt.classList[classOperation.operation].call(elt.classList, classOperation.cssClass);
}, classOperation.delay);
}, currentRunTime);
toggleOperation(elt, classOperation, classList, currentRunTime);
currentRunTime = currentRunTime + classOperation.delay;
} else {
currentRunTime = currentRunTime + classOperation.delay;
setTimeout(function () {
elt.classList[classOperation.operation].call(elt.classList, classOperation.cssClass);
}, currentRunTime);
performOperation(elt, classOperation, classList, currentRunTime);
}
}
}
Expand All @@ -69,7 +77,7 @@

htmx.defineExtension('class-tools', {
onEvent: function (name, evt) {
if (name === "htmx:processedNode") {
if (name === "htmx:afterProcessNode") {
var elt = evt.detail.elt;
maybeProcessClasses(elt);
if (elt.querySelectorAll) {
Expand All @@ -81,4 +89,4 @@
}
}
});
})();
})();
16 changes: 16 additions & 0 deletions dist/ext/disable-element.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"use strict";

// Disable Submit Button
htmx.defineExtension('disable-element', {
onEvent: function (name, evt) {
let elt = evt.detail.elt;
let target = elt.getAttribute("hx-disable-element");
let targetElement = (target == "self") ? elt : document.querySelector(target);

if (name === "htmx:beforeRequest" && targetElement) {
targetElement.disabled = true;
} else if (name == "htmx:afterRequest" && targetElement) {
targetElement.disabled = false;
}
}
});
37 changes: 37 additions & 0 deletions dist/ext/event-header.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
(function(){
function stringifyEvent(event) {
var obj = {};
for (var key in event) {
obj[key] = event[key];
}
return JSON.stringify(obj, function(key, value){
if(value instanceof Node){
var nodeRep = value.tagName;
if (nodeRep) {
nodeRep = nodeRep.toLowerCase();
if(value.id){
nodeRep += "#" + value.id;
}
if(value.classList && value.classList.length){
nodeRep += "." + value.classList.toString().replace(" ", ".")
}
return nodeRep;
} else {
return "Node"
}
}
if (value instanceof Window) return 'Window';
return value;
});
}

htmx.defineExtension('event-header', {
onEvent: function (name, evt) {
if (name === "htmx:configRequest") {
if (evt.detail.triggeringEvent) {
evt.detail.headers['Triggering-Event'] = stringifyEvent(evt.detail.triggeringEvent);
}
}
}
});
})();
Loading