Hi,
We're trying to use a full-trust XBAP as a sort-of-browser-independent bridge between Javascript and COM. .NET 4 allows scripting of XBAPs via BrowserInteropHelper.HostScript, and this does indeed work very nicely in Internet Explorer. The process is approximately:
- Script creates an iframe and sets the src to something like '../Xbaps/InteropXbap?[xbapInstanceNumber]'.
- Once the XBAP has loaded, it calls BrowserInteropHelper.HostScript.Xbap.registerImplementation([xbapInstanceNumber], [interop object]).
window.Xbap is just a JS object for handling callbacks from XBAPs.
In IE, it performs the callback into Javascript and the script can cheerfully call methods on the interop object.
In Firefox 3.6.3, BrowserInteropHelper.HostScript is null, so any attempt to use it throws runtime binding exceptions.
The WPF plugin for Firefox is installed and the XBAP does load. MS claim that the .NET 4 XBAP scripting feature works with 'all supported versions of IE and Firefox'.
Any idea what's going on here?
Thanks!