Silverlight Browser on CodePlex

Last week Ernie Booth announced a SilverlightBrowser plugin for Reflector. The plugin allows you to browse web pages that contain Silverlight elements and display their constituent Javascript, XAML and assembly files.

 

Ernie released the 0.1 Alpha code so people were free to modify it. The way the 0.1 code obtained the .js, .xaml and .dll files was by searching the HTML and Javascript source for specific patterns. For example it would search the HTML file for 'Silverlight.createObject' and extract the .xaml link from its parameters. This is similar to how Lutz's SilverlightLoader plugin works.

The problem with this technique is that it assumes that the 'Silverlight.js' and API (which comes with the Silverlight SDK) is being used. Unfortunately this won't always be the case. Some people may include the <object> or <embed> tags directly in the HTML or embed the XAML in a <script> block. A good example of this is Sam Ruby's Inline SVG in MSIE demo. This demo creates a Silverlight <embed> element and converts the SVG content into XAML on the fly!

I've modified Ernie's code so that is searches the WebBrowser object model for the .js and .xaml files. This means it is no longer making the assumption that 'Silverlight.js' is being used. It doesn't yet support XAML that is emended in a <script> block. I'm hoping to have it working with Sam's demo in the next version.

I have kicked off a community project for the SilverlightBrowser plugin on CodePlex (with Ernie's blessing). You can download latest version of the plugin from here.

3 Comments

Comments have been disabled for this content.