View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Scott Lanning > Mozilla-DOM-0.23 > Mozilla::DOM



Annotate this POD


New  2
Open  5
View/Report Bugs
Module Version: 0.23   Source  


Mozilla::DOM - Perl wrapping of the Mozilla/Gecko DOM


  # In Makefile.PL (see Gtk2::MozEmbed for an example)
  my $embed = ExtUtils::Depends->new('Mozilla::DOM');

  # You also need to compile with C++
      CC => 'c++',
      XSOPT => '-C++',


XXX: update this

The current purpose of this module is to wrap DOM event methods to be used with the Gtk2::MozEmbed module, which allows you to use GtkMozEmbed from Perl. GtkMozEmbed in turn allows you to use Mozilla's Gecko as a Gtk widget. Gtk2::MozEmbed has signal marshallers which rely on this module to map between the nsIDOM* interfaces and Gtk-Perl. There's nothing in this module (as far as I know) that is specific to GtkMozEmbed, however, so other Perl modules based on Gecko could use this (if they existed).

Future plans include wrapping more DOM interfaces such as nsIWebBrowser (requiring support in Gtk2::MozEmbed for gtk_moz_embed_get_nsIWebBrowser), nsIDOMWindow, and nsIDOMDocument. With this, you'd get access to the DOM, with methods such as GetElementsByTagName. Adding more support for DOM events would allow finding out more about an event and its targets, initiating events, and adding listeners. The idea is to then be able to script a Gecko-based browser from Perl. However, for the moment the functionality provided by this module probably isn't very useful.



A list of all the POD files distributed with this module.


A WWW::Mechanize-like module using this module and Gtk2::MozEmbed.

DOM Level 3 specification

In particular the sections on Key and Mouse events.


The header files for GtkMozEmbed.


A C++ example of using GtkMozEmbed to make a minimal browser.


The header files for Mozilla's interfaces. Generally, if a module is called Mozilla::DOM::Something, the corresponding header file is named 'nsIDOMSomething.h'. Three exceptions are nsISupports, nsIWebBrowser, and nsISelection, where the interface name doesn't include "DOM".

Description of the Mozilla Public API

Gecko Embedding FAQ

GtkMozEmbed: Gtk Mozilla Embedding Widget


Scott Lanning <>

with a lot of help from Torsten Schoenfeld and Boris Sukholitko (see Credits)


Copyright (C) 2005-2007 by Scott Lanning

syntax highlighting: