Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用IFRAME将Firefox2兼容的扩展更新为Firefox3?_Firefox_Xul - Fatal编程技术网

如何使用IFRAME将Firefox2兼容的扩展更新为Firefox3?

如何使用IFRAME将Firefox2兼容的扩展更新为Firefox3?,firefox,xul,Firefox,Xul,我正在尝试更新我为一些工作任务创建的自定义firefox扩展。基本上,它是一个侧边栏,用于在iframe中为各种目的调出我们的一个网页。当移动到Firefox3时,iframe根本不会出现 下面是一个XUL文件的示例,其中包含特定于扩展名的代码,包括iframe,目前仅尝试加载google,但无法处理任何内容。我在网上找不到任何关于FF3中可能导致这种情况的变化的信息。如有任何建议,将不胜感激 <?xml version="1.0"?> <?xml-stylesheet hre

我正在尝试更新我为一些工作任务创建的自定义firefox扩展。基本上,它是一个侧边栏,用于在iframe中为各种目的调出我们的一个网页。当移动到Firefox3时,iframe根本不会出现

下面是一个XUL文件的示例,其中包含特定于扩展名的代码,包括iframe,目前仅尝试加载google,但无法处理任何内容。我在网上找不到任何关于FF3中可能导致这种情况的变化的信息。如有任何建议,将不胜感激

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://customsidebar/skin/customsidebar.css" type="text/css"?>

<overlay id="customsidebar-Main" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  <script type="application/x-javascript" src="chrome://customsidebar/content/customsidebar.js"/>

  <vbox flex="1">
    <toolbar>
      <vbox>
        <hbox id="customsidebar_TopToolbarRow">
          <toolbarbutton label="Refresh" id="customsidebar_Refresh" oncommand="customsidebar_Refresh()" />
        </hbox>
        <hbox>
          <label control="customsidebar_StatusBox" value="Log"/>
          <textbox id="customsidebar_StatusBox" multiline="true" rows="1" wrap="off"  />
        </hbox>
      </vbox>
    </toolbar>

    <iframe id="customsidebar_Iframe" src="http://www.google.com" />
  </vbox>
</overlay>

这是覆盖XUL文件

<?xml version="1.0"?>
<overlay id="CustomSidebar-Overlay"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

    <menupopup id="viewSidebarMenu">
        <menuitem observes="viewCustomSidebar" />
    </menupopup>

  <broadcasterset id="mainBroadcasterSet">
    <broadcaster id="viewCustomSidebar"
      autoCheck="false"
      label="CustomSidebar"
      type="checkbox" group="sidebar"
      sidebarurl="chrome://customersidebar/content/customersidebarMain.xul"
      sidebartitle="CustomSidebar"
      oncommand="toggleSidebar('viewCustomSidebar');"/>
  </broadcasterset>

</overlay>

我会尝试在iframe上设置flex=“1”。如果这不起作用,也许可以尝试使用元素而不是iframe

  • 在iframe上设置flex=“1”
  • 侧边栏的XUL代码不是一个覆盖,而是一个加载在iframe中的文档(查看DOM检查器中的Firefox主窗口)。所以根元素应该是,而不是。这与flex=“1”相结合,应该可以显示页面
  • 您通常希望在iframe上放置type=“content”或type=“content primary”。如果您在其中加载不受信任的页面,肯定会这样
  • 从“覆盖”到“页面”的更改纠正了问题。我在版本控制中注意到,我以前在那里有flex=“1”,但在故障排除期间必须将其删除,但这只会导致元素的大小调整被关闭。谢谢