URL是否可以使用相对路径?
[changelog.htm
与options.xul
在同一目录中
options.xul
的部分
<setting title="&options.changelog.title;" type="control">
<button label="&options.changelog.label;"
oncommand="openDialog('chrome://myAddon/content/changelog.htm', '',
'dialog=no, modal=no, resizable=yes, width=500, height=600');"/>
</setting>
有其他选择吗?
更新:如果尝试以下操作,则会收到错误“控制台中的[NS_ERROR_MALFORMED_URI:"
]
<setting title="&options.changelog.title;" type="control">
<button label="&options.changelog.label;"
oncommand="openDialog('changelog.htm', '',
'dialog=no, modal=no, resizable=yes, width=500, height=600');"/>
</setting>
Update2:我应该提到我的测试是在<em:optionsType>2</em:optionsType>
上进行的,并且如以下答案所述,它似乎不起作用。
<button label="test" oncommand="openDialog('test.xul', '',
'dialog=no, modal=no, resizable=yes, width=500, height=600');"/>