MCPcopy
hub / github.com/vitejs/vite / onChange

Function onChange

packages/vite/src/client/client.ts:504–509  ·  view source on GitHub ↗
(newVisibility: DocumentVisibilityState)

Source from the content-addressed store, hash-verified

502 function waitForWindowShow(visibilityManager: VisibilityManager) {
503 return new Promise<void>((resolve) => {
504 const onChange = (newVisibility: DocumentVisibilityState) => {
505 if (newVisibility === 'visible') {
506 resolve()
507 visibilityManager.listeners.delete(onChange)
508 }
509 }
510 visibilityManager.listeners.add(onChange)
511 })
512 }

Callers

nothing calls this directly

Calls 2

deleteMethod · 0.80
resolveFunction · 0.50

Tested by

no test coverage detected