MDL-53546 SCORM: Set window.opener to null
authorDan Marsden <dan@danmarsden.com>
Tue, 29 Mar 2016 21:03:25 +0000 (10:03 +1300)
committerAndrew Nicols <andrew@nicols.co.uk>
Fri, 6 May 2016 01:27:24 +0000 (09:27 +0800)
mod/scorm/player.js
mod/scorm/view.js

index 47923c3..20dd6c0 100644 (file)
@@ -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;
     }
index b2c3d9c..22ab9c6 100644 (file)
@@ -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) {
@@ -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);
     }