MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / media

Function media

__tests__/ui-package.test.ts:453–462  ·  view source on GitHub ↗
(query: string)

Source from the content-addressed store, hash-verified

451 // `MediaQuery` (which `@xyflow/svelte`'s store constructs eagerly) calls it
452 // the moment a canvas mounts. Replace it outright rather than guarding.
453 const media = (query: string) => ({
454 media: query,
455 matches: false,
456 onchange: null,
457 addEventListener() {},
458 removeEventListener() {},
459 addListener() {},
460 removeListener() {},
461 dispatchEvent: () => false,
462 });
463 Object.defineProperty(window, 'matchMedia', { configurable: true, writable: true, value: media });
464 globals.matchMedia = media;
465 if (!Element.prototype.scrollIntoView) Element.prototype.scrollIntoView = () => {};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected