How to: Detect Whether the XBAP Plug-In for Firefox Is Installed

The Windows Presentation Foundation (WPF) plug-in for Firefox enables XAML browser applications (XBAPs) and loose XAML files to run in the Mozilla Firefox browser. This topic provides a script written in HTML and JavaScript that administrators can use to determine whether the WPF plug-in for Firefox is installed.

Note

For more information about installing, deploying, and detecting the .NET Framework, see Where to Obtain the .NET Framework Redistributable Package.

Example

When the .NET Framework 3.5 is installed, the client computer is configured with a WPF plug-in for Firefox. The following example script checks for the WPF plug-in for Firefox and then displays an appropriate status message.

<HTML>

  <HEAD>
    <TITLE>Test for the WPF plug-in for Firefox</TITLE>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />
    <SCRIPT type="text/javascript">
    <!--
    function OnLoad()
    {

       // Check for the WPF plug-in for Firefox and report
       var msg = "The WPF plug-in for Firefox is ";
       var wpfPlugin = navigator.plugins["Windows Presentation Foundation"];
       if( wpfPlugin != null ) {
          document.writeln(msg + " installed.");
       }
       else {
          document.writeln(msg + " not installed. Please install or reinstall the .NET Framework 3.5.");
       }
    }
    -->
    </SCRIPT>
  </HEAD>
  
  <BODY onload="OnLoad()" />

</HTML>

If the check for the WPF plug-in for Firefox is successful, the following status message is displayed:

The WPF plug-in for Firefox is installed.

Otherwise, the following status message is displayed:

The WPF plug-in for Firefox is not installed. Please install or reinstall the .NET Framework 3.5.

See Also

Tasks

How to: Detect Whether the .NET Framework 3.5 Is Installed

Concepts

How to: Detect Whether the .NET Framework 3.0 Is Installed

Firefox Add-ons to Support .NET Application Deployment

Windows Presentation Foundation XAML Browser Applications Overview