Activate clicks on mousedown to save at least ~100ms in response times. This being a pointer trick, it does not apply to touch devices.
// Option 1 (recommended): include in your build.
// No configuration options
import 'vpweb/fast';<!-- Option 2: load as stand-alone script -->
<script src="dist/fast.min.js"></script>-
Any anchor (
<a>) in a block with the.vp-fastclass or with the class directly will trigger early onmousedown. -
Any button or submit input element with the
.vp-fastclass, or in a form with the.vp-fastclass, will trigger early onmousedown.
Manually make an element trigger clicks on mousedown events. Prevents double-firing by tracking mousedown state.
Parameters:
el—HTMLElement— Element to monitor