diff --git a/TESTING.md b/TESTING.md index df00be3c..7edb8e53 100644 --- a/TESTING.md +++ b/TESTING.md @@ -10,7 +10,7 @@ This guide outlines how to test htmx, focusing on running tests headlessly or in npm install npm run test ``` -During test runs it will auto install playwrite +During test runs it will auto install playwright ## Running All Tests diff --git a/editors/jetbrains/htmx.web-types.json b/editors/jetbrains/htmx.web-types.json index 28cc8bbb..b1c043ae 100644 --- a/editors/jetbrains/htmx.web-types.json +++ b/editors/jetbrains/htmx.web-types.json @@ -431,12 +431,12 @@ }, { "name": "historyCacheHit", - "description": "This event is triggered when a cache hit occurs when restoring history\n\nYou can prevent the history restoration via `preventDefault()` to allow alternative restore handling.\nYou can also override the details of the history restoration request in this event if required\n\n##### Details\n\n* `detail.historyElt` - the history element or body that will get replaced\n* `detail.item.content` - the content of the cache that will be swapped in\n* `detail.item.title` - the page title to update from the cache\n* `detail.path` - the path and query of the page being restored\n* `detial.swapSpec` - the swapSpec to be used containing the defatul swapStyle='innerHTML'\n\n", + "description": "This event is triggered when a cache hit occurs when restoring history\n\nYou can prevent the history restoration via `preventDefault()` to allow alternative restore handling.\nYou can also override the details of the history restoration request in this event if required\n\n##### Details\n\n* `detail.historyElt` - the history element or body that will get replaced\n* `detail.item.content` - the content of the cache that will be swapped in\n* `detail.item.title` - the page title to update from the cache\n* `detail.path` - the path and query of the page being restored\n* `detail.swapSpec` - the swapSpec to be used containing the defatul swapStyle='innerHTML'\n\n", "doc-url": "https://htmx.org/events/#htmx:historyCacheHit" }, { "name": "historyCacheMiss", - "description": "This event is triggered when a cache miss occurs when restoring history\n\nYou can prevent the history restoration via `preventDefault()` to allow alternative restore handling.\nYou can also modify the xhr request or other details before it makes the the request to restore history\n\n##### Details\n\n* `detail.historyElt` - the history element or body that will get replaced\n* `detail.xhr` - the `XMLHttpRequest` that will retrieve the remote content for restoration\n* `detail.path` - the path and query of the page being restored\n* `detial.swapSpec` - the swapSpec to be used containing the defatul swapStyle='innerHTML'\n\n", + "description": "This event is triggered when a cache miss occurs when restoring history\n\nYou can prevent the history restoration via `preventDefault()` to allow alternative restore handling.\nYou can also modify the xhr request or other details before it makes the the request to restore history\n\n##### Details\n\n* `detail.historyElt` - the history element or body that will get replaced\n* `detail.xhr` - the `XMLHttpRequest` that will retrieve the remote content for restoration\n* `detail.path` - the path and query of the page being restored\n* `detail.swapSpec` - the swapSpec to be used containing the defatul swapStyle='innerHTML'\n\n", "doc-url": "https://htmx.org/events/#htmx:historyCacheMiss" }, { @@ -446,7 +446,7 @@ }, { "name": "historyCacheMissLoad", - "description": "This event is triggered when a cache miss occurs and a response has been retrieved successfully from the server\nfor the content to restore\n\nYou can modify the details before it makes the swap to restore the history\n\n##### Details\n\n* `detail.historyElt` - the history element or body that will get replaced\n* `detail.xhr` - the `XMLHttpRequest`\n* `detail.path` - the path and query of the page being restored\n* `detail.response` - the response text that will be swapped in\n* `detial.swapSpec` - the swapSpec to be used containing the defatul swapStyle='innerHTML'\n\n", + "description": "This event is triggered when a cache miss occurs and a response has been retrieved successfully from the server\nfor the content to restore\n\nYou can modify the details before it makes the swap to restore the history\n\n##### Details\n\n* `detail.historyElt` - the history element or body that will get replaced\n* `detail.xhr` - the `XMLHttpRequest`\n* `detail.path` - the path and query of the page being restored\n* `detail.response` - the response text that will be swapped in\n* `detail.swapSpec` - the swapSpec to be used containing the defatul swapStyle='innerHTML'\n\n", "doc-url": "https://htmx.org/events/#htmx:historyCacheMissLoad" }, { diff --git a/test/attributes/hx-swap-oob.js b/test/attributes/hx-swap-oob.js index 875c4d45..4acf5fe8 100644 --- a/test/attributes/hx-swap-oob.js +++ b/test/attributes/hx-swap-oob.js @@ -349,7 +349,7 @@ describe('hx-swap-oob attribute', function() { } it.skip('triggers htmx:oobErrorNoTarget when no targets found', function(done) { - // this test fails right now because when targets not found it returns an empty array which makes it miss the event as it should be if (targets.lenght) + // this test fails right now because when targets not found it returns an empty array which makes it miss the event as it should be if (targets.length) this.server.respondWith('GET', '/test', "Clicked
Swapped
") var div = make('
click me
') diff --git a/www/content/QUIRKS.md b/www/content/QUIRKS.md index 89ecc33a..17910d38 100644 --- a/www/content/QUIRKS.md +++ b/www/content/QUIRKS.md @@ -176,6 +176,17 @@ that "If something magically works, then it can also magically break." Despite this fact, I (Carson) still feel it is useful in many situations, and it is used on the website. +## Loading htmx asynchronously is unreliable + +htmx is designed to be loaded with a standard, blocking ` -