(em: EditorModel | Editor)
| 70 | } |
| 71 | |
| 72 | export 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 | |
| 79 | export function waitEditorEvent(em: Editor | EditorModel, event: string) { |
| 80 | return new Promise((resolve) => em.once(event, resolve)); |
no test coverage detected