views:

649

answers:

2
+2  Q: 

Gecko API for DOM

Does Gecko expose an API for working directly with its DOM? I'm looking for a class like HtmlElement that can be used to build/traverse trees of HTML content.

I'm trying to host Gecko as a web browser control in a desktop application, and would prefer a direct API rather than going through COM. Thanks!

+2  A: 

Yes, virtually all of the classes relating to the DOM are exposed through XPCOM. In fact, I believe the entire functionality of Gecko is exposed this way.

greyfade
I am doing my research, but any good pointers would be appreciated
elmarco
A: 

greyfade: whilst your answer is technically correct, i've found that the gecko DOM API is incredibly hard to find, because of all the javascript-based answers that keep popping up with a higher priority!

XPCOM is also really quite hard to understand, as it is functionally nearly 90% the same as COM.

you really want to get onto the mozilla dev platform newsgroup and ask this question: you're more likely to get answers from there, as the people who actually use XPCOM from c++ tend to accumulate around that newsgroup.

l.