
Product
Introducing Scala and Kotlin Support in Socket
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
svelte-disable-preload
Advanced tools
 
SveltKit provides a client-side router that handles navigation when anchor elements are clicked. It can also be configured to preload data to make your app seem "snappier". It does this by listening for various click
, mousedown
, mousemove
, and touchstart
events on the document which will bubble from elements.
For typical "web-app" use, this is no problem. But if you're working with HTML canvas
elements and requestAnimationFrame
animations, you may not want these extra event handlers being invoked - it can introduce a slight 'juddering' effect and spoil an otherwise smooth animation.
There is an option to disable it but this only disables the behavior from being invoked, i.e. the preloading itself - the event listeners are still there.
This package provides a simple action to apply noop event listeners to an element that prevent the document-level SvelteKit event handlers being invoked.
Install using your package manager of choice, e.g.
pnpm i svelte-no-preload
Import it into your component and use:
it on an element:
<script lang="ts">
import { disablePreload } from 'svelte-disable-preload'
</script>
<canvas use:disablePreload />
Your canvas interactions should now be slightly smoother.
FAQs
 
The npm package svelte-disable-preload receives a total of 149 weekly downloads. As such, svelte-disable-preload popularity was classified as not popular.
We found that svelte-disable-preload demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
Application Security
/Security News
Socket CEO Feross Aboukhadijeh and a16z partner Joel de la Garza discuss vibe coding, AI-driven software development, and how the rise of LLMs, despite their risks, still points toward a more secure and innovative future.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.