tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 53a95e432ac1fe6860cf550fdfba3c4de18910ea
parent 0ae07e0c7eddcfece6878a55c9615fb6f4c1398c
Author: Mark Striemer <mstriemer@mozilla.com>
Date:   Wed, 19 Nov 2025 22:25:17 +0000

Bug 2000010: Part 1 - Support moz-support-link options in config-based prefs r=mkennedy

Differential Revision: https://phabricator.services.mozilla.com/D272490

Diffstat:
Mbrowser/components/preferences/widgets/setting-control/setting-control.mjs | 11++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/browser/components/preferences/widgets/setting-control/setting-control.mjs b/browser/components/preferences/widgets/setting-control/setting-control.mjs @@ -379,11 +379,16 @@ export class SettingControl extends SettingElement { let optionTag = opt.control ? unsafeStatic(opt.control) : KNOWN_OPTIONS.get(control); + let spreadValues = spread(this.getOptionPropertyMapping(opt)); let children = "items" in opt ? this.itemsTemplate(opt) : this.optionsTemplate(opt); - return staticHtml`<${optionTag} - ${spread(this.getOptionPropertyMapping(opt))} - >${children}</${optionTag}>`; + if (opt.control == "a" && opt.controlAttrs?.is == "moz-support-link") { + // The `is` attribute must be set when the element is first added to the + // DOM. We need to mark that up manually, since `spread()` uses + // `el.setAttribute()` to set attributes it receives. + return html`<a is="moz-support-link" ${spreadValues}>${children}</a>`; + } + return staticHtml`<${optionTag} ${spreadValues}>${children}</${optionTag}>`; }); }