MCPcopy Index your code
hub / github.com/heygen-com/hyperframes / withStudioIframe

Function withStudioIframe

packages/core/src/runtime/init.test.ts:74–88  ·  view source on GitHub ↗
(run: () => void)

Source from the content-addressed store, hash-verified

72}
73
74function withStudioIframe(run: () => void): void {
75 const originalParent = window.parent;
76 Object.defineProperty(window, "parent", {
77 configurable: true,
78 value: {},
79 });
80 try {
81 run();
82 } finally {
83 Object.defineProperty(window, "parent", {
84 configurable: true,
85 value: originalParent,
86 });
87 }
88}
89
90describe("initSandboxRuntimeModular", () => {
91 const originalRequestAnimationFrame = window.requestAnimationFrame;

Callers 1

init.test.tsFile · 0.85

Calls 1

runFunction · 0.50

Tested by

no test coverage detected