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.

10 Replies to “XUL/E – What If”

  1. 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.

  2. 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” šŸ˜‰

    Thanks,
    Jeff

  3. 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?

  4. 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:
    http://www.iol.ie/~locka/mozilla/control.htm

    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.

  5. 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…

Comments are closed.