Skip to content

Commit

Permalink
MDL-53546 SCORM: Set window.opener to null
Browse files Browse the repository at this point in the history
  • Loading branch information
danmarsden authored and andrewnicols committed May 6, 2016
1 parent f38e287 commit 4fc53e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions mod/scorm/player.js
Expand Up @@ -23,6 +23,7 @@ function scorm_openpopup(url,name,options,width,height) {
options += ",width=" + width + ",height=" + height;

windowobj = window.open(url,name,options);
windowobj.opener = null;
if (!windowobj) {
return;
}
Expand Down
2 changes: 2 additions & 0 deletions mod/scorm/view.js
Expand Up @@ -83,6 +83,7 @@ M.mod_scormform.init = function(Y) {
winobj = window.open(launch_url,'Popup', poptions);
this.target = 'Popup';
scormredirect(winobj);
winobj.opener = null;
}
// Listen for view form submit and generate popup on user interaction.
if (scormform) {
Expand All @@ -91,6 +92,7 @@ M.mod_scormform.init = function(Y) {
winobj = window.open(launch_url, 'Popup', poptions);
this.target = 'Popup';
scormredirect(winobj);
winobj.opener = null;
e.preventDefault();
}, scormform);
}
Expand Down

0 comments on commit 4fc53e7

Please sign in to comment.