Skip to content

Commit

Permalink
Merge branch 'master' of github.com:talview/proview-moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
manquer committed Jun 4, 2020
2 parents 4bebf52 + 2363a49 commit e61101c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frame.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,14 @@ function receiveMessage(event) {

// Javascript event listener for window post message API (Ref: https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage)
window.addEventListener("message", receiveMessage, false);
window.addEventListener('error', function(e) {
document.getElementById('contentIFrame').src = 'https://pages.talview.com/proview/error/index.html';//setting error page when error occured.
}, true);


//Javascript function to start proview invoked upon postmessage from iframe
function startProview(authToken, session, proview_url, clear, skipHardwareTest, previewStyle) {
let url = proview_url || '//cdn.proview.io/init.js';
//Setting src attribute as error page URL so if the proview is not loaded error page will be shown
document.getElementById('contentIFrame').src = 'https://pages.talview.com/proview/error/index.html';
let iframeWindow = document.getElementById('contentIFrame').contentWindow;
(function(i,s,o,g,r,a,m){i['TalviewProctor']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
Expand Down

0 comments on commit e61101c

Please sign in to comment.