MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / initPreview

Function initPreview

frontend/preview/preview.tsx:146–167  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

144}
145
146function initPreview() {
147 installPreviewElectronApi();
148 const initOpts = {
149 tabId: PreviewTabId,
150 windowId: PreviewWindowId,
151 clientId: PreviewClientId,
152 environment: "renderer",
153 platform: "darwin",
154 isPreview: true,
155 } as GlobalInitOptions;
156 initGlobalAtoms(initOpts);
157 globalStore.set(getAtoms().fullConfigAtom, {} as FullConfigType);
158 GlobalModel.getInstance().initialize(initOpts);
159 loadFonts();
160 const container = document.getElementById("main")!;
161 let root = (container as any).__reactRoot;
162 if (!root) {
163 root = createRoot(container);
164 (container as any).__reactRoot = root;
165 }
166 root.render(<PreviewRoot />);
167}
168
169initPreview();

Callers 1

preview.tsxFile · 0.85

Calls 8

initGlobalAtomsFunction · 0.90
getAtomsFunction · 0.90
loadFontsFunction · 0.90
setMethod · 0.80
initializeMethod · 0.45
getInstanceMethod · 0.45
renderMethod · 0.45

Tested by

no test coverage detected