Re: how to get dom-node's attribute set by javascript code.

pengdw <[email protected]>
Newsgroups gmane.comp.mozilla.devel.dom
Message-ID <[email protected]>
On 2009-12-23 12:20, Boris Zbarsky wrote:
> On 12/22/09 11:06 PM, zz wrote:
>> that is when there is a (nsIDOMElement *aElement), how to use
>> JS_GetProperty to get the JS property, please tell me some class names,
>> cpp filenames to look into.
> 
> There isn't a particularly nice API for it.  You'll have to ask
> nsIXPConnect for the JS wrapper for that object, then use the API
> functions in jsapi.h to look for things on it.
> 
> -Boris

done.

first, I convert nsIContent *content to a jsval,
then use JS_GetProperty to get the JS property and output.

thanks, Boris.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.