2014-11-03 3 views
0

의 XUL에 XUL 요소를 추가합니다 Services.appShell.hiddenDOMWindow HTML 문서이기 때문에이 erroring되는 Services.appShell.hiddenWindow

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

이 아마입니다.

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을 시도 할 수 있습니다 : 어떻게 Services.appShell.hiddenWindow에 추가 .document


흥미로운 노트를 갖고있는 것 같다 나던?

+0

답장을 보내 주셔서 감사합니다. 그것은 흥미로운 일입니다. hiddenDOMWindow는 html 문서입니다. hiddenWindow는 xul입니다. 하지만 맥 네이티브 메뉴는 hiddenDOMWindow에서 xul 요소를 생성 할 수 있습니다. https://gist.github.com/Noitidart/91ac5c5343ed791cea86#comment-1319720 docShell 스와핑을 수행 할 예정이므로 브라우저가 필요합니다. ( – Noitidart