htmx/test/manual/preload.html
Ben Pate 294885454b Style updates
- use built-in htmx.parseInterval function instead of custom one
- smarter handling of mouse movement inside complex objects
- more descriptive values in preloadState
- also, semicolons
2020-12-29 20:39:07 -07:00

31 lines
967 B
HTML

<html>
<head>
<script src="../../src/htmx.js"></script>
<script src="../../src/ext/preload.js"></script>
</head>
<body hx-ext="preload">
<!--
<button hx-get="preload-1.html?button=true" preload="on:load wait:100ms">1</button>
<button hx-get="preload-2.html?button=true" preload="on:mouseover">2</button>
<a href="preload-1.html?link=true" preload="on:mouseover">1</a>
<a href="preload-2.html?link=true" preload="on:mousedown wait:0">2</a>
<div preload="on:load wait:3s">
<a href="preload-1.html?onload=true" preload>onload 1</a>
<a href="preload-2.html?onload=true" preload="wait:4s">onload 2</a>
</div>
<br>
<br>
-->
<div hx-get="preload-1.html?complex=true" preload="on:mouseover wait:2s">
<div>This is a complex object</div>
<div>With many sub-objects</div>
<div>Preload should only be canceled</div>
<div>If we leave the whole parent</div>
</div>
</body>
</html>