NAME
HTML::Object::EventListener - HTML Object Event Listener Class
SYNOPSIS
use HTML::Object::EventListener;
my $handler = HTML::Object::EventListener->new ||
die( HTML::Object::EventListener->error, "\n" );
VERSION
v0.2.0
DESCRIPTION
This module implements an HTML::Object event listener. It is instantiated by the addEventListener method
CONSTRUCTOR
new
Provided with an hash or hash reference of options and this will instantiate a new even listener and return the object.
It takes the same options as the methods listed below.
METHODS
capture
Sets or get the capture
boolean value for this event listener.
code
Same as "handleEvent"
element
Sets or gets the HTML::Object::Element object to which is attached this event listener.
handleEvent
Set or get an anonymous subroutine or a reference to a subroutine that is called whenever an event of the specified type occurs.
options
Set or get an hash reference of options for this event handler. Those options are the same as the ones passed to "addEventListener" in HTML::Object::EventTarget
remove
A convenient alternative method to "removeEventListener" in HTML::Object::EventTarget. It takes no parameter and calls "removeEventListener" in HTML::Object::EventTarget with all the necessary parameters, hassle free.
It returns the current event listener object upon success, and undef
upon error and then set an error
type
Set or get the type of event this object is for.
AUTHOR
Jacques Deguest <jack@deguest.jp>
SEE ALSO
HTML::Object::EventTarget, HTML::Object::Event, HTML::Object::EventListener
COPYRIGHT & LICENSE
Copyright(c) 2021 DEGUEST Pte. Ltd.
All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.