c# - Executing javascript in Silverlight with Firefox -
i trying execute piece of javascript in silverlight application. pretty simple example have created... single button tries execute line of code...
private void button_click(object sender, routedeventargs e) { htmlpage.window.eval("alert('hi');"); }
the alert window come freezes firefox, have force quit firefox never comes life.... has ran this??
i thought maybe firefox plugin causing problem have disabled them same results.
the way can work if go about:config
in firefox , set dom.ipc.plugins.enabled.npctrl.dll
false
any ideas???
well think partially figured out...
i added parameter silverlight hosting page...
<param name="windowless" value="true" />
so whole <div>
<div id="silverlightcontrolhost"> <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%"> <param name="source" value="clientbin/javascriptsltrigger.xap" /> <param name="onerror" value="onsilverlighterror" /> <param name="background" value="white" /> <param name="minruntimeversion" value="4.0.50826.0" /> <param name="windowless" value="true" /> <param name="autoupgrade" value="true" /> <a href="http://go.microsoft.com/fwlink/?linkid=149156&v=4.0.50826.0" style="text-decoration: none"> <img src="http://go.microsoft.com/fwlink/?linkid=161376" alt="get microsoft silverlight" style="border-style: none" /> </a> </object> <iframe id="_sl_historyframe" style="visibility: hidden; height: 0px; width: 0px; border: 0px"></iframe> </div>
Comments
Post a Comment