I have a scorm module which launches in a new window with resizable = 1 in window.open in my js file:
function OpenScormModuleWindow(scormModuleId, scormModu
Use an event listener which listens on resize, then you can reset your values:
window.addEventListener('resize', setWindowSize);
function setWindowSize() {
if (typeof (window.innerWidth) == 'number') {
myWidth = window.innerWidth;
myHeight = window.innerHeight;
} else {
if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
myWidth = document.documentElement.clientWidth;
myHeight = document.documentElement.clientHeight;
} else {
if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
myWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;
}
}
}
}
If you need a cross browser solution use jQuery ($.on('resize', func)
) or see JavaScript window resize event