=head1 NAME Mozilla::DOM::DocumentEvent =head1 DESCRIPTION Mozilla::DOM::DocumentEvent is a wrapper around an instance of Mozilla's nsIDOMDocumentEvent interface. This class inherits from L. * The nsIDOMDocumentEvent interface is the interface to the event * factory method on a DOM document object. * * For more information on this interface please see * LEwww.w3.orgETREDOM-Level-2-EventsE> (In particular, sections 1.5 and 1.6. Very important to read that if you want to understand how to create an L.) =head1 CLASS METHODS =head2 $iid = Mozilla::DOM::DocumentEvent->B() Pass this to QueryInterface on a L object to get back a DocumentEvent, like $window = $browser->GetContentDOMWindow; $doc = $window->GetDocument; $iid = Mozilla::DOM::DocumentEvent->GetIID $docevent = $doc->QueryInterface($iid); $event = $docevent->CreateEvent('MouseEvents'); $event->InitEvent('click', 1, 1); ... You can also print it out, and it will look like {46b91d66-28e2-11d4-ab1e-0010830123b4} =head1 METHODS =head2 $domevent = $docevent->B($eventType) =over =over =item * $eventtype (string) =back $event_type is a string, apparently one of 'Events', 'UIEvents', 'HTMLEvents', 'MutationEvents', 'KeyEvents', or 'MouseEvents'. See section 1.6 of the DOM Level 2 specs. Apparently 'KeyEvents' is not in DOM Level 2, but I was able to create them anyway. The return value is an L object. You can then call L. Or you can get the C of L, L, or L, pass it to $event->QueryInterface, call the corresponding Init(UI|Mouse|Key)Event method. After that, call L on an EventTarget. =back =head1 SEE ALSO L =head1 COPYRIGHT Copyright (C) 2005-2007, Scott Lanning This software is licensed under the LGPL. See L for a full notice. =cut