diff --git a/app/javascript/packs/series_overview.js b/app/javascript/packs/series_overview.js index 12a735d2b9..ee47cc07e4 100644 --- a/app/javascript/packs/series_overview.js +++ b/app/javascript/packs/series_overview.js @@ -1,8 +1,11 @@ -import { initExerciseDescription } from "exercise.ts"; +import { initExerciseDescription, afterResize, onFrameMessage, onFrameScroll } from "exercise.ts"; import { initSeriesShow } from "series"; window.dodona.initExerciseDescription = initExerciseDescription; window.dodona.initSeriesShow = initSeriesShow; +window.dodona.afterResize = afterResize; +window.dodona.onFrameMessage = onFrameMessage; +window.dodona.onFrameScroll = onFrameScroll; // will automatically bind do window.iFrameResize() require("iframe-resizer"); // eslint-disable-line no-undef diff --git a/app/javascript/packs/submission.js b/app/javascript/packs/submission.js index 1ecb5eaf22..c45ab5b66a 100644 --- a/app/javascript/packs/submission.js +++ b/app/javascript/packs/submission.js @@ -1,5 +1,5 @@ import { initSubmissionShow, initCorrectSubmissionToNextLink, initSubmissionHistory, showLastTab } from "submission.ts"; -import { initMathJax } from "exercise.ts"; +import { initMathJax, onFrameMessage, onFrameScroll } from "exercise.ts"; import { attachClipboard } from "copy"; import { evaluationState } from "state/Evaluations"; import codeListing from "code_listing"; @@ -19,5 +19,8 @@ window.dodona.showLastTab = showLastTab; window.dodona.initTutor = initTutor; window.dodona.initFileViewers = initFileViewers; +window.dodona.afterResize = () => {}; +window.dodona.onFrameMessage = onFrameMessage; +window.dodona.onFrameScroll = onFrameScroll; // will automatically bind to window.iFrameResize() require("iframe-resizer"); // eslint-disable-line no-undef