MCPcopy
hub / github.com/QwikDev/qwik / createRenderContext

Function createRenderContext

packages/qwik/src/core/render/execute-component.ts:105–128  ·  view source on GitHub ↗
(
  doc: Document,
  containerState: ContainerState
)

Source from the content-addressed store, hash-verified

103};
104
105export const createRenderContext = (
106 doc: Document,
107 containerState: ContainerState
108): RenderContext => {
109 const ctx: RenderContext = {
110 $static$: {
111 $doc$: doc,
112 $locale$: containerState.$serverData$.locale,
113 $containerState$: containerState,
114 $hostElements$: new Set(),
115 $operations$: [],
116 $postOperations$: [],
117 $roots$: [],
118 $addSlots$: [],
119 $rmSlots$: [],
120 $visited$: [],
121 },
122 $cmpCtx$: null,
123 $slotCtx$: undefined,
124 };
125 seal(ctx);
126 seal(ctx.$static$);
127 return ctx;
128};
129
130export const pushRenderContext = (ctx: RenderContext): RenderContext => {
131 const newCtx: RenderContext = {

Callers 3

renderMarkedFunction · 0.90
renderFunction · 0.90
_renderSSRFunction · 0.90

Calls 1

sealFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…