mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-09-27 04:50:43 +00:00

* do not use template parsing for full body response content * clear polling when reprocessing an element to avoid stacking up poll requests latter fixes https://github.com/bigskysoftware/htmx/issues/1350
28 lines
829 B
HTML
28 lines
829 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>Clicking On Button Should Not Stack Polling</h1>
|
|
<button onclick="pollingDiv.setAttribute('foo', Math.random());
|
|
htmx.process(pollingDiv)">
|
|
Reprocess Div...
|
|
</button>
|
|
<div id="pollingDiv" hx-trigger="every 1s" hx-get="/more_divs" hx-swap="beforeend">
|
|
<div>Initial Content</div>
|
|
</div>
|
|
<hr/>
|
|
|
|
</body>
|
|
</html>
|