diff --git a/js/h5p.js b/js/h5p.js index b93d9a7..7ed4074 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -215,12 +215,11 @@ H5P.init = function () { // Insert H5Ps that should be in iframes. H5P.jQuery("iframe.h5p-iframe").each(function () { var contentId = H5P.jQuery(this).data('content-id'); + this.contentWindow.H5P = this.contentWindow.H5P || {}; + this.contentWindow.H5P.externalEmbed = false; this.contentDocument.open(); this.contentDocument.write('' + H5P.getHeadTags(contentId) + '
'); this.contentDocument.close(); - this.contentWindow.H5P = { - externalEmbed: false - }; }); };