xulでドッキングパネルを作成する方法を教えてください。火かき棒のように動作するはずです。私はこのような何か試してみました:xulのドッキングパネル
myWindow = window.open("chrome://project/content/myWindow.xul", "someRandomName", "chrome");
をしてmyWindow.xulは次のとおりです。
<?xml version="1.0" encoding="utd-8"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xul-overlay href="chrome://project/content/myPanel.xul"?>
<window id="dockedPanel" title="my super extension" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml">
<hbox flex="1">
<vbox id="myPanel"/>
</hbox>
</window>
myPanel.xulが私のパネルであり、そして私が開くとmyPanelがmyPanel.xul
にVBOXのIDですこのようなウィンドウでは、私の望みどおりに見えますが、すべてのボタンやその他のコンポーネントは機能しません。たとえば、私はmyPanel.xulでボタンがある場合:
<button id="myButton" label="button" onclick = "jsScriptFromOtherFile.someFunction()"/>
を、私はmywindowの上でそのボタンをクリックすると、その後、someFunctionは呼び出されません。私はなぜ、そしてそれを働かせる方法を知らない。
動作しないサンプルを投稿できますか?あなたの説明から、問題が何であるかは明らかではありません。たとえば、XULファイルにスクリプトファイルを含めると仮定します。 –