Firefox 打开不带导航栏的XUL应用程序
我创建了一个XUL对话框,每当我打开这个对话框时,它都会通过Firefox导航栏打开。是否可以在没有firefox导航栏的情况下打开XUL应用程序?附上截图。Iam使用Javascript的window.open命令。i、 eFirefox 打开不带导航栏的XUL应用程序,firefox,firefox-addon,xul,Firefox,Firefox Addon,Xul,我创建了一个XUL对话框,每当我打开这个对话框时,它都会通过Firefox导航栏打开。是否可以在没有firefox导航栏的情况下打开XUL应用程序?附上截图。Iam使用Javascript的window.open命令。i、 e window.open("http://localhost/test.xul", "test", "chrome, width=130,height=60, menubar=no"); 这是XUL代码 <?xml version="1.0"?> <?x
window.open("http://localhost/test.xul", "test", "chrome, width=130,height=60, menubar=no");
这是XUL代码
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<dialog id="donothing" title="Dialog example"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
buttons="accept,cancel"
buttonlabelcancel="Cancel"
buttonlabelaccept="Save"
ondialogaccept="return doOK();"
ondialogcancel="return doCancel();">
<dialogheader title="Options" description="My preferences"/>
<groupbox>
<caption label="Colour"/>
<radiogroup>
<radio label="Red"/>
<radio label="Green" selected="true"/>
<radio label="Blue"/>
</radiogroup>
<label value="Nickname"/>
<textbox/>
</groupbox>
</dialog>
尝试在窗口中添加“位置=否”。打开:
window.open("http://localhost/test.xul", "test", "chrome, width=130,height=60, menubar=no, location=no");
请参阅以获取参考。尝试在窗口中添加“位置=否”。打开:
window.open("http://localhost/test.xul", "test", "chrome, width=130,height=60, menubar=no, location=no");
请参阅以供参考。谢谢您提供的信息,但它在最新的firefox中不起作用,因为firefox已禁用它,但是我们可以从about:config启用它。@TPSstar-我不知道它是否是您真正想要的,但您可以使用:
window.openDialog(“http://localhost/test.xul“,”,“全部=否,”)代码>参见参考资料我试过了,但是javascript给出了错误“SeurityError:操作不安全”。@TPSstar-hmm。奇怪。我自己做的,没有错误:window.openDialog(“chrome://testExt/content/test.xul“,”,“全部=否,”)
您是否正在从chrome:///加载xul文件?谢谢您提供的信息,但它在最新的firefox中不起作用,因为firefox已禁用它,但是我们可以从about:config启用它。@TPSstar-我不知道它是否是您真正想要的,但您可以使用:window.openDialog(“http://localhost/test.xul“,”,“全部=否,”)代码>参见参考资料我试过了,但是javascript给出了错误“SeurityError:操作不安全”。@TPSstar-hmm。奇怪。我自己做的,没有错误:window.openDialog(“chrome://testExt/content/test.xul“,”,“全部=否,”)代码>是否从chrome://加载xul文件?