MCPcopy
hub / github.com/GrapesJS/grapesjs / fixJsDomIframe

Function fixJsDomIframe

packages/core/test/common.ts:72–77  ·  view source on GitHub ↗
(em: EditorModel | Editor)

Source from the content-addressed store, hash-verified

70}
71
72export const fixJsDomIframe = (em: EditorModel | Editor) => {
73 em.on(CanvasEvents.frameLoad, ({ el, view }) => {
74 // this seems to fix the issue of the loop
75 el.onload = null;
76 });
77};
78
79export function waitEditorEvent(em: Editor | EditorModel, event: string) {
80 return new Promise((resolve) => em.once(event, resolve));

Callers 4

initTestEditorFunction · 0.90
index.tsFile · 0.90
initTestEditorFunction · 0.90
fixJsDomFunction · 0.85

Calls 1

onMethod · 0.45

Tested by

no test coverage detected