XUL/E – What If

WPF is the coolest thing an MFC programmer has ever seen. Of course, developers who have been working with declarative markups (HTML, SVG, XUL or Laszlo) and RAD form builders (Delphi and VB) are not hyperventilating. Sure, its nice that Microsoft has introduced a development platform that is actually easy to use, but such platforms have been around a while. Now, WPF/E is ready to take rich internet application (RIA) development by storm. Its not the first (XUL, Flash, Flex and Laszlo are not betas), but Microsoft’s entry is not to be taken lightly.

The WPF/E hype and the quest for a non-Adobe SVG viewer in Internet Explorer (IE) made me to start to wonder what it would take to get Mozilla’s platform running in IE. Turns out, it’s easier than I thought:

  1. Get XULRunner on your Windows machine.
    (From Mozilla or as part of my XUL Explorer)
  2. Register the Mozilla ActiveX control
  3. Mark control “Safe” or Tweak IE’s security.
    (You can register and mark the control safe using this patch)
  4. Done!

This could even be made easier (zero steps) by creating a CAB file for XULRunner and adding code to the Mozilla ActiveX control to mark itself “safe”.

Control Setup using Patch

  1. Unzip the patch files to wherever you installed XULRunner. If you just installed XUL Explorer, XULRunner is in a subfolder.
  2. Execute “mozactivex-reg.bat”

For those of you wondering about the “patch”. It simply registers the Mozilla ActiveX control and then adds 2 registry keys to the control that tell Windows that the Mozilla control is “Safe for initialization” and “Safe for scripting”. See this Microsoft page for more information.

XUL/E Samples
These samples can be run in Firefox (any platform) and IE (windows). Make sure you have installed and configured the Mozilla ActiveX control. The difference between these links and the ones on a previous post is that these are displayed using a special “viewer” HTML page.

Note: If using IE7, the yellow information bar will prompt you to let the Mozilla ActiveX control run. In IE6, you will see a dialog prompt.

Not only can you create rich clients in IE using XUL, but you can also view SVG in IE! As always, feedback, comments and new ideas are welcome.


  1. Mad Ramblings » Running XUL in IE said,

    December 27, 2006 @ 3:05 pm

    […] This appears to be the coolest thing I’ve seen for at least a couple of weeks. It describes how to convince XULRunner to run as an ActiveX control to support XUL and SVG in Internet Explorer. Could be useful for those situations where you just have to run IE… Posted in Uncategorized […]

  2. thirdhand said,

    December 27, 2006 @ 4:04 pm

    This sounds really cool. I think Mozilla Corp/Foundation (or someone else) should look into making use of these possibilities to give WPF/E some competition.

  3. stelt said,

    December 27, 2006 @ 7:51 pm

    I’ve added it to http://svg.startpagina.nl

  4. Jeff Schiller said,

    December 27, 2006 @ 9:45 pm

    Hi Mark,

    Ok, I’m officially starting to get excited about this. I’m assuming you’ve seen this discussion on svg-developers: http://tech.groups.yahoo.com/group/svg-developers/message/56745

    But can you help me understand with your proposal:

    1) Would the “plugin” (for lack of a better term) also work with XHTML and XHTML+SVG content? How do you set it up so that IE tosses control over to the Mozilla plugin/control when encountering certain MIME types?

    2) Does it support SVG DOM scripting also? This would be VERY important.

    3) How hard would it be for Mozilla to officially get the “zero step” version of this up and supported so that we can point people at it? We need something as simple as a browser plugin download if we’re going to pursue the Mozilla-within-IE option. Even though Adobe won’t be removing the plugin download, it’s still a dead-end, so I think the movement off of ASV should start as soon as there is a minimally viable solution that comes close to ASV’s level of support. And Mozilla-within-IE feels kind of like a “coup” ;)


  5. Jeff Schiller said,

    December 27, 2006 @ 9:49 pm

    Oh, and this is a more recent discussion: http://tech.groups.yahoo.com/group/svg-developers/message/57598

  6. zproxy said,

    December 29, 2006 @ 2:28 am

    This could be it:) Someone please make the zero-step version official:)

  7. Dan said,

    December 29, 2006 @ 4:42 am

    This is cool, would it be possible to include it as part of for example the Google / Yahoo Toolbar ?

    If it could be done (and it was) it’d instantly get a large userbase. What about 3D stuff in the XUL language one of the major benefits with WPF is that it supposedly makes 3D objects with video and audio easy to tie together, can something similar be achieved with XUL?

  8. Mark Finkle said,

    December 29, 2006 @ 10:02 am

    First, I just wanted to make clear that this control has existed in Mozilla for a while. Checkout Adam Lock’s website for more information about it:

    Jeff – Currently, there is no MIME-type handoff from IE. The control acts like an embedded Mozilla webbrowser. You can navigate to any content type that Mozilla browsers support. DOM scripting should work, but doesn’t in my tests. The control has a “Document” property that should give IE (or any container) access to the internal DOM. I am looking into this. It works when hosted from a C++ application , but not IE.

    Dan – XUL / SVG do not directly support 3D. I say directly because there are libraries to add 3D support to SVG. While WPF does support 3D, WPF/E currently does not either.

    The “zero-steps” version will be very easy, once a host server and certificate are available. I am going to start some internal discussions at Mozilla to see what approach the company wants to take.

  9. Jeff Schiller said,

    January 1, 2007 @ 11:44 pm

    Alright – I’m still confused by this. Are you saying that the control has to be manually “invoked” by my web page? If this is the case, then that’s not the greatest news for us web developers who want to be browser/plugin-agnostic when it comes to next-gen web technologies like XHTML/SVG. I guess some JS sniffing for that control would have to be added by every XHTML/SVG web developer out there.

    How hard would it be to make the control a true IE plugin based on this ActiveX control that AUTOMATICALLY handles XHTML and SVG content based on the MIME type? I’m clueless when it comes to this stuff at the moment…

  10. Mark Finkle’s Weblog » Mozilla ActiveX Control said,

    January 23, 2007 @ 11:09 am

    […] I was a little surprised how “popular” my XUL/E post became. The demo viewer page alone has over double the hits of the second place page. In that post, I demonstrated how Mozilla’s rendering engine (Gecko) could be embedded in Internet Explorer and used to display rich XUL applications and advanced SVG and canvas graphics. Of course, XUL/E is a play on Microsoft’s brand-new-fantastic-sliced-bread WPF/E technology and Mozilla is not mounting a XUL/E initiative (but I can dare to dream). […]

RSS feed for comments on this post