Re: Gtk2::MozEmbed + DOM

On Sun, 10 Apr 2005, Torsten Schoenfeld wrote:
On Wed, 2005-04-06 at 12:45 +0000, Scott Lanning wrote:
Using just-uploaded Mozilla::DOM 0.04 and the small attached
patch against CVS HEAD of Gtk2::MozEmbed, you can access the
DOM Window with

   $browser = $embed->get_nsIWebBrowser();
   $window = $browser->get_content_domwindow();

Cool, I'm going to apply the XS part of the patch.  But I think the
pumzilla example is getting a bit too big for a simple demo browser.
Especially the DOM stuff is not something a basic browser will need.
Can you try to create a separate example for all the DOM related

I swear, we are on the same wavelength. :) I just added some
examples to Mozilla::DOM (0.07). There's also a problem I realized
where if the get_nsIWebBrowser part is not compiled in,
then calling it on $embed would fail. I was wanting to do
a lot of experimenting to see what all I could do now, anyway.

(Please see the XXX in pumzilla for a segfault problem, though.)

I haven't looked into it yet, but it might well be that the dom window
is only created when the embed widget is realized.  So if you try to
fetch it before show_all() (or show() or realize()) was called, it just
isn't valid yet.

I should handle errors better anyway, and at least return undef
instead of a bogus pointer.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]