Bug 1382572 - Display Android options_ui of newly installed WebExtensions when about:addons is opened.
MozReview-Commit-ID: HbTghvTdQ28
--- a/mobile/android/chrome/content/aboutAddons.js
+++ b/mobile/android/chrome/content/aboutAddons.js
@@ -354,17 +354,21 @@ var Addons = {
let optionsURL = aListItem.getAttribute("optionsURL");
// Always clean the options content before rendering the options of the
// newly selected extension.
optionsBox.innerHTML = "";
switch (parseInt(addon.optionsType)) {
case AddonManager.OPTIONS_TYPE_INLINE_BROWSER:
- this.createWebExtensionOptions(optionsBox, optionsURL, addon.optionsBrowserStyle);
+ // WebExtensions are loaded asynchronously and the optionsURL
+ // may not be available via listitem when the add-on has just been
+ // installed, but it is available on the addon if one is set.
+ detailItem.setAttribute("optionsURL", addon.optionsURL);
+ this.createWebExtensionOptions(optionsBox, addon.optionsURL, addon.optionsBrowserStyle);
break;
case AddonManager.OPTIONS_TYPE_INLINE:
this.createInlineOptions(optionsBox, optionsURL, aListItem);
break;
}
showAddonOptions();
},