Jeremias Reith wrote:
I figured out that there is no easy way to embed mozilla without the whole GUI stuff. So I suggest an extension to the embedding API:
I'm not sure an extension to the embedding API is what you need. I think that you can accomplish everything you mention below using the GRE. Set up an XPCOM environment, and instantiate the objects you need (a parser, and a network stream) using XPCOM.
The parser and networking components shouln't be used by an embeddor because these are private interfaces and will probably change quite often. So these interfaces should be wrapped in a way nsIWebBrowser does. I think the embedding API should provide some utilities for all
the web standards (DOM, RDF etc.) which make it possible to do various things with a few lines of code. E.g.:
embeddedMozilla->RetrieveDOMFromURI(NS_LITERAL_STRING("http://mozilla.org"), getter_AddRefs(document));
- a new wget that - strips ads away - modifys the stylesheet - storing a webpage as rendered image - ... - a webspider - ...
I am not familar enough with mozilla to know if this can be easily done, so some feedback would be nice.
a wget the modifies the DOM would not be especially hard, I don't think. Rendering would be more complicated, but probably doable. Are you thinking about doing it?
Yes, I want to create something like that but first of all I want to hide mozilla's internals behind a lightweight API.
/Jeremias Reith
