如何在install.rdf中动态更新updateURL?

时间:2021-06-24 07:24:49

Is it possible to dynamically update updateURL into install.rdf file. I have my update url in a javascript file stored in a variable, is it possible to use this url as update url in install.rdf file in xpi ?

是否可以将updateURL动态更新为install.rdf文件。我有一个存储在变量中的javascript文件中的更新url,是否可以在xpi的install.rdf文件中使用此url作为更新url?

1 个解决方案

#1


0  

You can update your add-ons manifest but you cannot pass your own URL as update URL.

This part is just an FYI:

您可以更新加载项清单,但不能将自己的URL作为更新URL传递。这部分只是一个FYI:

if you look into omni.ja\modules\XPIProvider.jsm, function loadManifest (line 4601) , you can see that it reads update URL from your add-on's manifest. After loading the manifest, it will use its updateURL to send request and check for an update(UpdateChecker).

如果您查看omni.ja \ modules \ XPIProvider.jsm,函数loadManifest(第4601行),您可以看到它从您的加载项清单中读取更新URL。加载清单后,它将使用其updateURL发送请求并检查更新(UpdateChecker)。

#1


0  

You can update your add-ons manifest but you cannot pass your own URL as update URL.

This part is just an FYI:

您可以更新加载项清单,但不能将自己的URL作为更新URL传递。这部分只是一个FYI:

if you look into omni.ja\modules\XPIProvider.jsm, function loadManifest (line 4601) , you can see that it reads update URL from your add-on's manifest. After loading the manifest, it will use its updateURL to send request and check for an update(UpdateChecker).

如果您查看omni.ja \ modules \ XPIProvider.jsm,函数loadManifest(第4601行),您可以看到它从您的加载项清单中读取更新URL。加载清单后,它将使用其updateURL发送请求并检查更新(UpdateChecker)。