I've been looking into how aghost.js works and I am curious about something. I like the strategy that YouTube and their ilk use for allowing visitors to embed their player in your site and wonder if the Dev Team could explain why this same strategy isn't used in WPF/E. This works with WPF/E:
<object id="theHost" width="400" height="400"
classid="CLSID:32C73088-76AE-40F7-AC40-81F62CB2C1DA">
<param name="Source" value="plugin.xaml" />
<param name="BackgroundColor" value="White" />
<embed id="theHost" width="400" height="400"
pluginspage="http://go.microsoft.com/fwlink/ LinkID=77792&clcid=0x409"
Source="plugin.xaml" BackgroundColor="White"
type="application/ag-plugin" />
</object>
Note that the embed tag is inside of the object tag. This works on Windows on both IE and FireFox. (Don't have a Mac to test Safari and Firefox). Any reason we don't use this strategy
I do understand one specific reason for the way that aghost works in that by writing to innerHtml you are avoiding the "click this control to activate it" but that the IE lost Patient fight forces IE to introduce. But even if you are using that strategy, it would seem easier to just output this than to have to detect the browser.
TIA

AGHost.js Strategy
Marcos Torres
Greenwu
Couple of quesitons about your comment:
ram013
We have the embed and object tags structured like that just for compatibility across all browsers that we support. Aghost.js is just a helper function for doing the document.write (activation for IE).
You are welcome to modify the aghost.js file for your own needs (such as not using document.write except on IE).
-mark
Program Manager
Microsoft
This post is provided "as-is"
Aleniko29139
Sorry I did -- setting innerHtml is what occurs.
#2 - there were some known issues with SourceElement and FireFox regarding using innerHtml actually. I thought they were fixed. Make sure you do not have any carriage returns/line breaks after the <script> tag and before the first element.
-mark
Program Manager
Microsoft
This post is provided "as-is"