MCPcopy Index your code
hub / github.com/Sandpack/nodebox-runtime / getPreviewFrameLocator

Function getPreviewFrameLocator

tests/index.ts:64–72  ·  view source on GitHub ↗
({ page }, use)

Source from the content-addressed store, hash-verified

62 },
63
64 async getPreviewFrameLocator({ page }, use) {
65 await use(async () => {
66 // First, wait for the "Previews" frame to become visible.
67 // This frame hosts the bridge and the app's preview frame.
68 const previewsFrame = page.frameLocator('#frame');
69 await previewsFrame.locator('html').waitFor();
70 return previewsFrame.frameLocator('[name="preview"]').locator('body');
71 });
72 },
73
74 async getPreviewFrame({ getBridgeFrameLocator, getPreviewFrameLocator }, use) {
75 await use(async () => {

Callers 2

getPreviewFrameFunction · 0.85

Calls 1

waitForMethod · 0.80

Tested by

no test coverage detected