Posted on 2005-04-18 15:23:56-07 by uwevoelker
Using Mozilla::DOM without gtk window
Hello Scott,

great work so far!

I was curious if I could use Mozilla::DOM without the Gtk2 window:
#!/usr/bin/perl -w use strict; use Cwd qw(getcwd); use Data::Dumper; use Gtk2::MozEmbed 0.04; my $moz = Gtk2::MozEmbed->new; $moz->signal_connect(net_stop => \&net_stop_cb); my $cwd = getcwd; $moz->load_url("file://$cwd/termine.html"); sleep(1); sub net_stop_cb { my $moz = shift; my $browser = $moz->get_nsIWebBrowser; my $window = $browser->GetContentDOMWindow; my $doc = $window->GetDocument; my $docelem = $doc->GetDocumentElement; print Dumper($docelem); return; }
But nothing happens. Do I really have to use?
my $window = create_window($class); # Display the application window. $window->show_all(); Gtk2->main();
Thank you,
good bye, Uwe
Direct Responses: 358 | Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.