Re: Modifying DOM using GtkMozEmbed?

Christopher Blizzard <[email protected]> Tue, 27 May 2003 19:43:50 -0400
Newsgroups gmane.comp.mozilla.devel.embedding,gmane.comp.mozilla.devel.xpcom
Message-ID <[email protected]>
Felix Breuer wrote:

> Christopher Blizzard wrote:
>
>> Felix Breuer wrote:
>>
>>> After some research I found the following: Accessing the DOM
>>> * is not possible using gtkmozembed.h.
>>> * _is_ possible when including gtkmozembed_interal.h and calling 
>>> gtk_moz_embed_get_nsIWebBrowser
>>>
>>> Only Problem: If you are not using C(++) but some other language, 
>>> the bindings to gtkmozembed which you are using probably won't wrap 
>>> all of Mozilla's internals, so you can't use this function. 
>>
>>
>>
>> Yep.  And that's exactly why they are in a seperate header file.
>
>
> The interface of a DOM tree is standartized. Wouldn't it make sense to 
> expose the DOM tree of a document directly? (From gtkmozembed.h?)
>
> There would only be a point to this if bindings to Mozilla's DOM 
> implementation could be generated easily. Is there an easy way to bind 
> Mozilla's DOM to e.g. Python? 

There is a standard interface, yes, and we use it.  However, that 
interface is currently in C++ and I'm not going to wrap it in C.  That's 
would add a lot of useless bloat.

There are already python-xpcom bindings.  I don't know how functional 
they are, but that would be a good route to go.  I might be convinced to 
add a way to get the DOM document from the _internal header and that 
would make life easier for people.

--Chris

>
>
>
>>
>> --Chris
>>
>>>
>>>
>>>
>>> Felix Breuer wrote:
>>>
>>>> Hello!
>>>>
>>>> I want to embed Mozilla (Gecko) in a Gtk application. The natural 
>>>> choice is to use GtkMozEmbed. But: is it possible to access the DOM 
>>>> of the loaded document and modify it? Where can I find out how?
>>>>
>>>> Thanks for any pointers,
>>>> Felix Breuer
>>>>
>>>
>>
>>
>>
>