Discussion:
Setting span html element text in C++
Vaibhav
2010-04-13 06:01:12 UTC
Permalink
Hi,

I am writing firefox extension using C++.
I want to set text of the span html element.

In Javascript, I used 'textcontent' javascript property to set span
element text.

How can I do it in C++?

I found nsIDOMHTMLElement interface & its child interfaces.

They seem useful.

I am not getting the way in which I will use nsIDOMHTMLElement
interface & its child interfaces to set span element text.

Please suggest me the way!

Thanks,
Vaibhav.
Boris Zbarsky
2010-04-13 18:40:36 UTC
Permalink
Post by Vaibhav
In Javascript, I used 'textcontent' javascript property to set span
element text.
How can I do it in C++?
See nsIDOM3Node.textContent

-Boris
Vaibhav
2010-04-19 04:44:05 UTC
Permalink
Post by Boris Zbarsky
Post by Vaibhav
In Javascript, I used 'textcontent' javascript property to set span
element text.
How can I do it in C++?
See nsIDOM3Node.textContent
-Boris
Very Thanks Boris,

It is a solution.

I got another solution as:
Create a text node and append it as child of span element.

Vaibhav.

Continue reading on narkive:
Loading...