tldr; JScript.NET dll をスクリプトに対して安全であるとマークする方法は?
この JScript.NET ライブラリを検討してください(helloworld1.js)
。
package helloworld1{
class test1 {
public function test1run(){
return 'This is a string returned from helloworld1.dll';
}
}
}
通してから
jsc.exe /nologo /t:library helloworld1.js
と
regasm /nologo /codebase helloworld1.dll
ローカルの HTML ページで次のように使用できます。
var helloworld1 = new ActiveXObject("helloworld1.test1");
alert(helloworld1.test1run());
それはすべて正常に機能し、アラートが表示されThis is a string returned from helloworld1.dll
ます。
今... ActiveX オブジェクトがインスタンス化されるたびにポップアップする恐ろしい IE セキュリティ警告を取り除きたい:
An ActiveX control on this page might be unsafe to interact with other parts of the page. Do you want to allow this interaction?
セキュリティ警告を削除する方法は、dll を としてマークしてsafe for scripting
実装することIObjectSafety
です。
VB6 と VB.NET でこれを行う方法は知っていますが、JScript.NET で実装するにはどうすればよいですか?
どんな助けでも本当に感謝しています。