htmx/www/static/test/manual/poll-condition-test.html
Alexander Petros d1288d202a
Remove old tests from the website (#1733)
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.
2023-09-19 11:07:24 -05:00

29 lines
913 B
HTML

<html lang="en">
<head>
<meta charset="utf-8" />
<title>Test Scroll Behavior</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", "/more_divs", "<div>More Content</div>");
</script>
<h1>Should Not Add Any Content Due To False Condition</h1>
<div hx-trigger="every 3s [false]" hx-get="/more_divs" hx-swap="beforeend" style="height: 100px; overflow: scroll">
No Polling....
</div>
<hr/>
<h1>Should Add Content Due To True Condition</h1>
<div hx-trigger="every 3s [true]" hx-get="/more_divs" hx-swap="beforeend" style="height: 100px; overflow: scroll">
No Polling....
</div>
<hr/>
</body>
</html>