2011-05-08 73 views

回答

2

這裏是一個疊加的方法。

文章:Creating toolbar button @ MDC

XUL彈出的對話框可以在鉻指notification-popupidentity-popup(建議)://browser/content/browser.xul

和iframe在XUL繳費。

<panel id="sth-popup" type="arrow" hidden="true" noautofocus="true" onpopupshown="(initial action)" level="top"> 
    <iframe id="sth-body" src="chrome://(extenstion name)/(sth html)" flex="1"/> 
</panel> 

對於聽衆工具欄按鈕(的onclick,onkeypress事件),請指gIdentityHandler . handleIdentityButtonEvent鉻://browser/content/browser.js


如果你的插件是一個自舉請參閱Oxymoronical的Playing with windows in restartless (bootstrapped) extensions

需要Javascript DOM控制技術。

引用XUL示例,並簡單地通過document.createElement方法或者甚至通過document.createElementNS(XULNS, "(tag name)")方法創建元素,其中const XULNS = 'http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul';已被寫入。


隨意問更多,併成爲我們的註冊用戶之一。 :-)

0

你的問題是與創建iframe?或創建iframe內容? (例如,你不能將src屬性設置爲不是你想要顯示iframe的頁面的域的文件)