Thunderbird 扩展:访问 mail-urlfield 的值(xbl 元素)

Thunderbird extension: accessing the value of mail-urlfield (xbl element)

我正在玩 thunderbird API,我正在尝试创建一个按钮来 'alert(url)' RSS 面板中原始网站的内容。据我所知,元素在 https://github.com/mozilla/releases-comm-central/blob/master/suite/mailnews/msgHdrViewOverlay.xul

 <mail-urlfield id="expandedcontent-baseBox" label="&originalWebsite.label;" collapsed="true"/>

此邮件 url 字段在 https://github.com/mozilla/releases-comm-central/blob/a9cb7a6e8097e08c81eea8b3927fa82389a8a515/mail/base/content/mailWidgets.xml

中定义为 XUL 绑定
 <binding id="mail-urlfield" extends="chrome://messenger/content/mailWidgets.xml#mail-headerfield">
    <content>
      <xul:description
                 onclick="if (event.button != 2)
                            openUILink(event.target.textContent, event);"
                 class="headerValue text-link headerValueUrl"
                 anonid="headerValue" flex="1" readonly="true"
                 role="textbox" aria-readonly="true" context="copyUrlPopup"/>
    </content>
  </binding>

document.getElementById return "mail-urlfield" 但是我可以得到元素的值 ("http://....") 吗? (我尝试了 elt.label、elt.value ...)

好的,知道了:

var x = document.getElementById("expandedcontent-baseBox");
var y = document.getAnonymousElementByAttribute(x,"anonid","headerValue");
var www = y.textContent ;