0
訪問面板在我browser.xul文件我有一個面板元件:無法從腳本
<panel id="panel1">
<!-- Elements -->
</panel>
當我嘗試:
window.document.getElementById("panel1").openPopup(button, "after_start", 0, 0, false, false);
的瀏覽器說:
window.document.getElementById("panel1") is null.
我在這裏錯過了什麼嗎?
我得到了答案。其實我是在疊加層內創建一個新的面板。基本上,覆蓋是爲了覆蓋某些東西。所以,當有新東西時,它就會忽略它。所以,我將它添加到已經存在的box元素中。它工作正常! –
是的,看到我的答案在這裏:http://stackoverflow.com/questions/7391635/firefox-addons-hidden-browser-in-xul-overlay/7491047#7491047 –