HTML::DOM::Event::Mutation - A Perl class for HTML DOM mutation event objects


NAME

HTML::DOM::Event::Mutation - A Perl class for HTML DOM mutation event objects


SYNOPSIS

  # ...


DESCRIPTION

This class provides MutationEvent objects for the HTML::DOM manpage, which objects are passed to event handlers for certain event types when they are invoked. It inherits from the HTML::DOM::Event manpage.


METHODS

See also those inherited from the HTML::DOM::Event manpage.

DOM Attributes

These are all read-only and ignore their arguments.

relatedNode

This holds the parent node for DOMNodeInserted and DOMNodeRemoved events, and the Attr node involved for a DOMAttrModified event.

prevValue

The previous value for DOMAttrModified and DOMCharacterDataModified events.

newValue

The new value for the same two event types.

attrName

The name of the affected attribute for DOMAttrModified events.

attrChange

Other Methods

initMutationEvent ( $name, $propagates_up, $cancellable, $rel_node, $prev_value, $new_value, $attr_name, $attr_change_type )

This initialises the event object. See initEvent in the HTML::DOM::Event manpage for more detail.

init ( ... )

Alternative to initMutationEvent that's easier to use:

  init $event
      type => $type,
      propagates_up => 1,
      cancellable => 1,
      rel_node => $node,
      new_value => $foo,
      prev_value => $bar,
      attr_name => $name,
      attr_change_type => HTML::DOM::Event::Mutation::REMOVAL,
  ;


EXPORTS

The following constants are exported upon request, either individually or with the ':all' tag. They indicated the type of change that a DOMAttrModified event represents.


SEE ALSO

the HTML::DOM manpage

the HTML::DOM::Event manpage

the HTML::DOM::Event::Mouse manpage