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

时间:2015-10-21 22:31:23

标签: javascript plugins xul thunderbird

我正在使用雷鸟API,我正在尝试创建一个警告(网址)' RSS面板内原始网站的内容。据我所知,该元素位于https://github.com/mozilla/releases-comm-central/blob/master/suite/mailnews/msgHdrViewOverlay.xul

#include <stdio.h>
int main ()
{
    int  temp, n, reverse = 0, rem;
    n = 100;
    while ( n <= 999)
    {
        temp = n;
        while(temp!=0)
        {
            rem = temp%10;
            reverse = reverse*10+rem;
            temp/=10;
        }
        if ( reverse == n )
        {
            printf(" %d \t", n);
        }
        n = n + 1;
    }
    return 0;
}

此mail-urlfield在https://github.com/mozilla/releases-comm-central/blob/a9cb7a6e8097e08c81eea8b3927fa82389a8a515/mail/base/content/mailWidgets.xml

中定义为XUL绑定
 <mail-urlfield id="expandedcontent-baseBox" label="&originalWebsite.label;" collapsed="true"/>

document.getElementById返回&#34; mail-urlfield&#34;但是我可以获得元素的值(&#34; http://....&#34;)? (我试过elt.label,elt.value ......)

1 个答案:

答案 0 :(得分:0)

好的,明白了:

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