4

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!

Tony the Pony
  • 40,327
  • 71
  • 187
  • 281

2 Answers2

2

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.

user362834
  • 259
  • 2
  • 5
2

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
  • 24,948
  • 7
  • 64
  • 80