我正在嘗試更新我爲某些工作創建的自定義Firefox擴展。基本上它是一個側欄,用於各種目的,在iframe中提供我們的一個網頁。當移動到Firefox 3時,iframe不會出現。如何使用IFRAME更新Firefox 2兼容擴展到Firefox 3?
下面是包含擴展特定代碼(包括iframe)的XUL文件示例,目前只是試圖加載谷歌,但它不會與任何東西一起工作。我無法在網上找到任何可能導致此問題的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>
從「疊加」更改爲「頁面」更正了問題。我注意到在版本控制中,過去我的flex =「1」,但在故障排除期間必須將其刪除,但這只是導致元素大小關閉。謝謝! – 2008-10-03 21:07:57