MCPcopy
hub / github.com/vercel/next.js / unmountPrefetchableInstance

Function unmountPrefetchableInstance

packages/next/src/client/components/links.ts:221–234  ·  view source on GitHub ↗
(element: Element)

Source from the content-addressed store, hash-verified

219}
220
221export function unmountPrefetchableInstance(element: Element) {
222 const instance = prefetchable.get(element)
223 if (instance !== undefined) {
224 prefetchable.delete(element)
225 prefetchableAndVisible.delete(instance)
226 const prefetchTask = instance.prefetchTask
227 if (prefetchTask !== null) {
228 cancelPrefetchTask(prefetchTask)
229 }
230 }
231 if (observer !== null) {
232 observer.unobserve(element)
233 }
234}
235
236function handleIntersect(entries: Array<IntersectionObserverEntry>) {
237 for (const entry of entries) {

Callers 3

LinkComponentFunction · 0.90
FormFunction · 0.90
observeVisibilityFunction · 0.85

Calls 3

cancelPrefetchTaskFunction · 0.90
getMethod · 0.65
deleteMethod · 0.45

Tested by

no test coverage detected