From aaa49aa8359e9dc10ab71d3169fdcb7464541bdb Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Wed, 30 Mar 2016 10:03:25 +1300 Subject: [PATCH] MDL-53546 SCORM: Set window.opener to null --- mod/scorm/player.js | 1 + mod/scorm/view.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/mod/scorm/player.js b/mod/scorm/player.js index 47923c359a5..20dd6c08b0e 100644 --- a/mod/scorm/player.js +++ b/mod/scorm/player.js @@ -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; } diff --git a/mod/scorm/view.js b/mod/scorm/view.js index b2c3d9cc2f2..22ab9c6a1ad 100644 --- a/mod/scorm/view.js +++ b/mod/scorm/view.js @@ -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); }