Gecko API for DOM

房东的猫 提交于 2019-12-07 07:25:39

问题


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!


回答1:


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.




回答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.



来源:https://stackoverflow.com/questions/563996/gecko-api-for-dom

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!