( doc: Document, containerState: ContainerState )
| 103 | }; |
| 104 | |
| 105 | export 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 | |
| 130 | export const pushRenderContext = (ctx: RenderContext): RenderContext => { |
| 131 | const newCtx: RenderContext = { |
no test coverage detected
searching dependent graphs…