firefox附加SDK cfx工具打开url参数

时间:2021-06-14 19:38:23

I am creating firefox extension by using Add-on SDK, I am using cfx tool to test and run add-on.

我正在使用附加SDK创建firefox扩展,我使用cfx工具来测试和运行附加组件。

When I try to run tool from command line like;

当我尝试从命令行运行工具时;

cfx run '-url "www.google.com"'

it does open firefox but not navigating to google.com. Just opens blank page and obviously it does not run my extension. I need to navigate manually to a url to trigger my javascript-based extension.

它确实打开了Firefox但没有导航到google.com。只需打开空白页面,显然它不会运行我的扩展程序。我需要手动导航到一个url来触发基于javascript的扩展。

Is there any way to call cfx tool to open a specific url?

有没有办法调用cfx工具来打开特定的URL?

1 个解决方案

#1


6  

Use --binary-args=CMDARGS

使用--binary-args = CMDARGS

additional arguments passed to the binary (run, test)

传递给二进制文件的其他参数(运行,测试)

(See cfx run --help for additional arguments to cfx run)

(有关cfx run的其他参数,请参阅cfx run --help)

E.g. the following works for me:

例如。以下对我有用:

cfx run --binary-args="-url www.google.com"

#1


6  

Use --binary-args=CMDARGS

使用--binary-args = CMDARGS

additional arguments passed to the binary (run, test)

传递给二进制文件的其他参数(运行,测试)

(See cfx run --help for additional arguments to cfx run)

(有关cfx run的其他参数,请参阅cfx run --help)

E.g. the following works for me:

例如。以下对我有用:

cfx run --binary-args="-url www.google.com"