How to sign activeX object in JavaScript

心不动则不痛 提交于 2019-12-08 13:39:19

问题


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.


回答1:


Ok, find a workaround. I add the url to the "Trusted Sites" area and it's now correctly working.



来源:https://stackoverflow.com/questions/17041602/how-to-sign-activex-object-in-javascript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!