The manakai project

Web::DOM::Event

DOM Event object

DESCRIPTION

The Web::DOM::Event class implements the DOM Event interface. It represents a DOM event.

METHODS

Following methods are available:

$ev = new Web::DOM::Event $type, {cancelable => $bool, bubbles => $bool}

Create and initialize a new event object. The first required argument identifies the event type, e.g. click or readystatechange. The second argument, which can be omitted, specifies event properties as a hash reference. [DOM] [DOMPERL]

Subclasses of the Web::DOM::Event class do also provide the new constructor method, e.g. Web::DOM::MouseEvent->new.

$boolean = $ev->bubbles

Return whether the event bubbles or not. [DOM]

$boolean = $ev->cancelable

Return whether the event is cancelable or not. [DOM]

$object = $ev->current_target

Return the current target object of the event. [DOM]

$boolean = $ev->manakai_dispatched

Return whether the event is currently dispatched or not. [MANAKAI]

$boolean = $ev->default_prevented

Return whether the default action has been prevented or not. [DOM]

$const = $ev->event_phase

Return the numerical constant value representing the current stage of the event propagation. See the "CONSTANTS" section. [DOM]

$boolean = $ev->manakai_immediate_propagation_stopped

Return whether the stop_propagation or stop_immediate_propagation method has been invoked or not. [MANAKAI]

$boolean = $ev->is_trusted

Return whether the event is trusted, i.e. fired by the browser or not. [DOM]

$ev->prevent_default

Prevent any execution of the default action of the event. [DOM]

$boolean = $ev->manakai_propagation_stopped
$boolean = $ev->cancel_bubble

Return whether the stop_propagation method has been invoked or not. [DOM] [MANAKAI]

$ev->stop_immediate_propagation

Stop the propagation of the event immediately. [DOM]

$ev->stop_propagation
$ev->cancel_bubble (1)

Stop the propagation of the event. [DOM]

$object = $ev->target

Return the event target object to which the event has been dispatched. [DOM]

$time = $ev->timestamp

Return the timestamp (seconds from the Unix epoch) at which the event has been created. [DOM]

$string = $ev->type

Return the event type. [DOM]

In addition, it also supports historical init_event, return_value, and src_element methods. [DOM]

CONSTANTS

Constants are exported from the Web::DOM::Event module by default. Following constants are used by the event_phase method [DOM]:

  NONE, CAPTURING_PHASE, AT_TARGET, BUBBLING_PHASE

SUBCLASSES

There are subclasses of the class, representing subinterfaces of the Event interface, including: Web::DOM::CustomEvent, Web::DOM::MessageEvent, and Web::DOM::UIEvent.

SPECIFICATIONS

DOM

DOM Standard <https://dom.spec.whatwg.org/#interface-event>.

MANAKAI

manakai DOM Extensions <https://suika.suikawiki.org/~wakaba/wiki/sw/n/manakai++DOM%20Extensions>.

DOMPERL

manakai's DOM Perl Binding <https://suika.suikawiki.org/~wakaba/wiki/sw/n/manakai%27s%20DOM%20Perl%20Binding>.

SEE ALSO

Web::DOM::EventTarget.

AUTHOR

Wakaba <wakaba@suikawiki.org>.

LICENSE

Copyright 2013-2018 Wakaba <wakaba@suikawiki.org>.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

POD ERRORS

Hey! The above document had some coding errors, which are explained below:

Around line 111:

Deleting unknown formatting code K<>