I have created a project in Articulate Storyline 3. The output of the project is basically a web page with lots of javascript. One is able to place custom javascript code inside the project. My custom code causes the browser to enter full screen mode when a button on the page is pressed. This works well in Chrome and Firefox, and even goes full screen in IE11. However, when one presses the Next button on the page to go to the next slide in the project, IE11 generates a javascript error. The error is SCRIPT16389: Incorrect function. This error seems to be a generic IE javascript error and I'm unsure how to troubleshoot this further. The custom javacript code I entered does not seem to be the immediate cause of the error, but the error is generated when the Next button is pressed. Below is the custom code I have attached to the button, that causes the browser to go full screen.
function add_script(scriptURL,oID) {
var scriptEl = document.createElement("script");
var head=document.getElementsByTagName('head')[0];
scriptEl.type = "text/javascript";
scriptEl.src = scriptURL;
scriptEl.id=oID;
head.appendChild(scriptEl);}
//only want to add these once!
if(document.getElementById('jquery')==null){
add_script("https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js","jquery");
}
/* Get into full screen */
function GoInFullscreen(preso) {
if(preso.requestFullscreen)
preso.requestFullscreen();
else if(preso.mozRequestFullScreen)
preso.mozRequestFullScreen();
else if(preso.webkitRequestFullscreen)
preso.webkitRequestFullscreen();
else if(preso.msRequestFullscreen)
preso.msRequestFullscreen();
}
/* Get out of full screen */
function GoOutFullscreen() {
if(document.exitFullscreen)
document.exitFullscreen();
else if(document.mozCancelFullScreen)
document.mozCancelFullScreen();
else if(document.webkitExitFullscreen)
document.webkitExitFullscreen();
else if(document.msExitFullscreen)
document.msExitFullscreen();
}
/* Is currently in full screen or not */
function IsFullScreenCurrently() {
var full_screen_preso = document.fullscreenpreso || document.webkitFullscreenpreso || document.mozFullScreenpreso || document.msFullscreenpreso || null;
// If no preso is in full-screen
if(full_screen_preso === null)
return false;
else
return true;
}
GoInFullscreen($("#preso").get(0));
The issue can be seen by opening this link in IE11, http://andersonelearning.com/demo/FullScreen%201.1%20-%20Storyline%20output/story.html . Press the blue Enter Full Screen button. IE11 should go into full screen mode. Then press the Next button at the lower right side of the screen. The expected behavior is that the text slide 2 should appear on the screen, but instead the above error is thrown.