mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-09-26 20:40:41 +00:00
Fix variable names (#3344)
* Fix variable names * Fix one more variable name
This commit is contained in:
parent
d91c8820f9
commit
9fb3c0e492
@ -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
|
||||
|
||||
|
@ -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"
|
||||
},
|
||||
{
|
||||
|
@ -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<div id='nonexistent' hx-swap-oob='true'>Swapped</div>")
|
||||
var div = make('<div hx-get="/test">click me</div>')
|
||||
|
||||
|
@ -258,7 +258,7 @@ Thank you to all our generous <a href="https://github.com/sponsors/bigskysoftwar
|
||||
<div>
|
||||
<a data-github-account="tracebit-com" href="https://tracebit.com/?utm_source=htmx">
|
||||
<img class="dark-hidden" alt="Tracebit Cloud Canaries" src="/img/tracebit-logo.png">
|
||||
<img class="dark-visbile" alt="Tracebit Cloud Canaries" src="/img/tracebit-logo-dark.png">
|
||||
<img class="dark-visible" alt="Tracebit Cloud Canaries" src="/img/tracebit-logo-dark.png">
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
|
@ -275,7 +275,7 @@ You can also override the details of the history restoration request in this eve
|
||||
* `detail.item.content` - the content of the cache that will be swapped in
|
||||
* `detail.item.title` - the page title to update from the cache
|
||||
* `detail.path` - the path and query of the page being restored
|
||||
* `detial.swapSpec` - the swapSpec to be used containing the defatul swapStyle='innerHTML'
|
||||
* `detail.swapSpec` - the swapSpec to be used containing the defatul swapStyle='innerHTML'
|
||||
|
||||
### Event - `htmx:historyCacheMiss` {#htmx:historyCacheMiss}
|
||||
|
||||
@ -289,7 +289,7 @@ You can also modify the xhr request or other details before it makes the the req
|
||||
* `detail.historyElt` - the history element or body that will get replaced
|
||||
* `detail.xhr` - the `XMLHttpRequest` that will retrieve the remote content for restoration
|
||||
* `detail.path` - the path and query of the page being restored
|
||||
* `detial.swapSpec` - the swapSpec to be used containing the defatul swapStyle='innerHTML'
|
||||
* `detail.swapSpec` - the swapSpec to be used containing the defatul swapStyle='innerHTML'
|
||||
|
||||
### Event - `htmx:historyCacheMissLoadError` {#htmx:historyCacheMissLoadError}
|
||||
|
||||
@ -314,7 +314,7 @@ You can modify the details before it makes the swap to restore the history
|
||||
* `detail.xhr` - the `XMLHttpRequest`
|
||||
* `detail.path` - the path and query of the page being restored
|
||||
* `detail.response` - the response text that will be swapped in
|
||||
* `detial.swapSpec` - the swapSpec to be used containing the defatul swapStyle='innerHTML'
|
||||
* `detail.swapSpec` - the swapSpec to be used containing the defatul swapStyle='innerHTML'
|
||||
|
||||
### Event - `htmx:historyRestore` {#htmx:historyRestore}
|
||||
|
||||
|
@ -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<div id='nonexistent' hx-swap-oob='true'>Swapped</div>")
|
||||
var div = make('<div hx-get="/test">click me</div>')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user