Commit aca2ff0a authored by Dan Marsden's avatar Dan Marsden Committed by Andrew Nicols
Browse files

MDL-53546 SCORM: Set window.opener to null

parent 28908d2d
...@@ -23,6 +23,7 @@ function scorm_openpopup(url,name,options,width,height) { ...@@ -23,6 +23,7 @@ function scorm_openpopup(url,name,options,width,height) {
options += ",width=" + width + ",height=" + height; options += ",width=" + width + ",height=" + height;
windowobj = window.open(url,name,options); windowobj = window.open(url,name,options);
windowobj.opener = null;
if (!windowobj) { if (!windowobj) {
return; return;
} }
......
...@@ -83,6 +83,7 @@ M.mod_scormform.init = function(Y) { ...@@ -83,6 +83,7 @@ M.mod_scormform.init = function(Y) {
winobj = window.open(launch_url,'Popup', poptions); winobj = window.open(launch_url,'Popup', poptions);
this.target = 'Popup'; this.target = 'Popup';
scormredirect(winobj); scormredirect(winobj);
winobj.opener = null;
} }
// Listen for view form submit and generate popup on user interaction. // Listen for view form submit and generate popup on user interaction.
if (scormform) { if (scormform) {
...@@ -91,6 +92,7 @@ M.mod_scormform.init = function(Y) { ...@@ -91,6 +92,7 @@ M.mod_scormform.init = function(Y) {
winobj = window.open(launch_url, 'Popup', poptions); winobj = window.open(launch_url, 'Popup', poptions);
this.target = 'Popup'; this.target = 'Popup';
scormredirect(winobj); scormredirect(winobj);
winobj.opener = null;
e.preventDefault(); e.preventDefault();
}, scormform); }, scormform);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment