2014-11-03 57 views
0

的XUL這示數:XUL元素添加到Services.appShell.hiddenWindow

Services.appShell.hiddenDOMWindow.document.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'browser'); 

這可能是因爲Services.appShell.hiddenDOMWindow是一個HTML文檔。如何添加到Services.appShell.hiddenWindow它似乎有一個.document


有趣的註解:

Services.appShell.hiddenWindow != Services.appShell.hiddenDOMWindow.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIWebNavigation).QueryInterface(Ci.nsIDocShellTreeItem).rootTreeItem.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindow); 

回答

0

我不認爲你可以創建<browser>節點,你可以嘗試iframe呢?

+0

感謝erik的回覆!這是一件奇怪的事情。 hiddenDOMWindow是html文件,我認爲hiddenWindow是xul。但mac原生菜單是能夠在hiddenDOMWindow創建xul元素:https://gist.github.com/Noitidart/91ac5c5343ed791cea86#comment-1319720我需要瀏覽器,因爲我打算做docShell交換:( – Noitidart 2014-11-06 23:46:02