Firefox 的 Windows Presentation Foundation (WPF) 插件使 XAML browser applications (XBAPs) 和松散 XAML 文件能够在 Mozilla Firefox 浏览器中运行。 本主题提供一个以 HTML 和 JavaScript 编写的脚本,管理员可以使用该脚本确定是否安装了 Firefox 的 WPF 插件。
![]() |
---|
有关安装、部署和检测 .NET Framework 的更多信息,请参见安装 .NET Framework。 |
示例
在安装 .NET Framework 3.5 时,客户端计算机将配置为带有 Firefox 的 WPF 插件。 下面的示例脚本将检查是否有 Firefox 的 WPF 插件,然后显示相应的状态消息。
<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>
如果检查 Firefox 的 WPF 插件的操作成功,则会显示以下状态消息:
The WPF plug-in for Firefox is installed.
否则,将显示以下状态消息:
The WPF plug-in for Firefox is not installed. Please install or reinstall the .NET Framework 3.5.