Ok, find a workaround. I add the url to the "Trusted Sites" area and it's now correctly working.
How to sign activeX object in JavaScript
-
31-05-2022 - |
Question
I have a function with ActiveX Objects in my Javascript file to simulate a F11 for fullscreen mode. I want to sign this code to avoid some security issue, anyone who knows how I could do it ?
The code :
function fullScreenWindow() {
var el = document.documentElement
, rfs = // for newer Webkit and Firefox
el.requestFullScreen
|| el.webkitRequestFullScreen
|| el.mozRequestFullScreen
|| el.msRequestFullScreen
;
if(typeof rfs!="undefined" && rfs){
rfs.call(el);
} else if(typeof window.ActiveXObject!="undefined"){
// for Internet Explorer
var wscript = new ActiveXObject("WScript.Shell");
if (wscript!=null) {
wscript.SendKeys("{F11}");
}
}
}
Thank you for any help.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow