【发布时间】:2012-01-05 02:48:28
【问题描述】:
我正在尝试制作自己的 Firefox 工具栏,但我遇到了覆盖问题。 所以我已经设置了我的环境(我可以在 FF 扩展管理器中看到我的扩展),现在我正在尝试添加新的覆盖。
chrome.manifest
content sandbox chrome/content/
overlay chrome://browser/content/browser.xul chrome://sandbox/content/overlay.xul
overlay.xul
<?xml version="1.0"?>
<overlay
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<toolbox id="browser-toolbox">
<toolbar id="findfile_toolbar">
<label control="findfile_filename" value="Search for files named:"/>
<textbox id="findfile_filename"/>
<label control="findfile_dir" value="Directory:"/>
<textbox id="findfile_dir"/>
<button label="Browse..."/>
</toolbar>
</toolbox>
</overlay>
当我重新启动我的 FF 时,我没有看到结果,问题出在哪里?
【问题讨论】:
-
叠加层看起来不错。我建议您打开错误控制台并查找警告 - 可能您的 chrome 命名空间没有正确注册。