mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-09-27 13:01:03 +00:00

The website used to host every past test suite, copied into the www directory. We no longer need that on the website (and it makes the codebase impossible to search) so I removed all the old tests and the new tests are hosted simply at /test. I also replaced the www.js script with a simpler www.sh one (since we no longer need to do anything besides copying, really), which allowed me to remove a node dependency that was only used in that script.
29 lines
962 B
HTML
29 lines
962 B
HTML
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>Test if indicators are invisible by default</title>
|
|
<script src="../../src/htmx.js"></script>
|
|
</head>
|
|
<body style="padding:20px;font-family: sans-serif">
|
|
<script src="../../node_modules/sinon/pkg/sinon.js"></script>
|
|
<script src="../../src/htmx.js"></script>
|
|
<script src="../util/util.js"></script>
|
|
<script>
|
|
server = makeServer();
|
|
server.autoRespond = true;
|
|
server.respondWith("GET", "/prompt", function(xhr){
|
|
xhr.respond(200, {}, "You entered: " + xhr.requestHeaders["HX-Prompt"]);
|
|
})
|
|
server.respondWith("GET", "/confirm", function(xhr){
|
|
xhr.respond(200, {}, "Confirmed")
|
|
})
|
|
</script>
|
|
<h1>Prompt & Confirm Tests</h1>
|
|
<button hx-get="/prompt" hx-prompt="Enter some text and it should be echoed in this button">Click For Prompt</button>
|
|
<br/>
|
|
<br/>
|
|
<br/>
|
|
<button hx-get="/confirm" hx-confirm="Confirm The Action">Click For Confirm</button>
|
|
</body>
|
|
</html>
|