]> _ Git - fluidbook-html5.git/commitdiff
wip #4077 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 18 Nov 2020 16:52:58 +0000 (17:52 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 18 Nov 2020 16:52:58 +0000 (17:52 +0100)
js/libs/scorm/scorm.js

index fd686a6ff3aab5ba98fea32228bf2cf904915c13..201f97958ac38a5d984148f76d8e01f5314ab84a 100644 (file)
@@ -47,8 +47,8 @@ function initScorm() {
         if (FORCE_SCORM) {
             SCORM_OK = true;
         }
-    }catch (e) {
-        
+    } catch (e) {
+
     }
 
     if (SCORM_OK) {
@@ -209,11 +209,17 @@ function scormComplete() {
         finishScorm();
         return;
     }
-    setTimeout(function () {
-        parent.close();
-        top.close();
-        window.close();
-    }, 1500);
+}
+
+function scormCompleteAndClose() {
+    scormComplete();
+    scormClose();
+}
+
+function scormClose() {
+    parent.close();
+    top.close();
+    window.close();
 }
 
 function getScormValue(elementName) {