[英]Thunderbird extension: accessing the value of mail-urlfield (xbl element)
我正在使用雷鸟API,并且试图创建一个按钮来在RSS面板内“警告(url)”原始网站的内容。 据我所知,该元素位于https://github.com/mozilla/releases-comm-central/blob/master/suite/mailnews/msgHdrViewOverlay.xul
<mail-urlfield id="expandedcontent-baseBox" label="&originalWebsite.label;" collapsed="true"/>
在https://github.com/mozilla/releases-comm-central/blob/a9cb7a6e8097e08c81eea8b3927fa82389a8a515/mail/base/content/mailWidgets.xml中,此mail-urlfield被定义为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返回“ mail-urlfield”,但是我可以获取元素的值(“ http:// ....”)吗? (我尝试了elt.label,elt.value ...)
好的,我知道了:
var x = document.getElementById("expandedcontent-baseBox");
var y = document.getAnonymousElementByAttribute(x,"anonid","headerValue");
var www = y.textContent ;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.