[Project_owners] about mozAdo

MacCpp maccpp at yahoo.com.ar
Wed Apr 28 10:26:53 EDT 2004


Charles:
             Thanks, is just in time too, I am going to trying to use it.
             Mariano.

Charles Melhorn wrote:

>>
>>
>> 5.- If in a script I create an object, x 
>> =document.createElement('span'); how can I add text to it?
>>
>>
>> In later versions of Mozilla use x.textContent but unfortunately that 
>> crashes in earlier versions...
>>
>
> If this is not too late to be useful, try something like:
>
>    var span = document.createElementNS("http://www.w3.org/1999/xhtml", 
> "html:span");
>    span.setAttribute("style", "color: green; font-style: italic");
>    var text_node = document.createTextNode("XUL: the future is now");
>    span.appendChild(text_node);
>
> CM





More information about the Project_owners mailing list