HTML::O...OM::List(3)
okay so bestie, welcome to HTML::O...OM::List(3) β the User Contributed Perl Documentation page for the HTML Object DOM List abstract class. it's giving Perl internals, but make it make sense π
no cap.
π NAME π
HTML::Object::DOM::List β HTML Object DOM List Abstract Class. periodt.
β¨ SYNOPSIS β¨
package HTML::Object::DOM::VideoTrackList;
use parent qw( HTML::Object::DOM::List );
my $list = HTML::Object::DOM::VideoTrackList->new || d
ie( HTML::Object::DOM::VideoTrackList->error, "\n" );
π VERSION π
v0.3.0
π¦ DESCRIPTION π¦
This is an abstract class designed to be inherited by HTML::Object::DOM::TextTrackCueList, HTML::Object::DOM::TextTrackList and HTML::Object::DOM::VideoTrackList.
It inherits from HTML::Object::EventTarget.
abstract-class vibe check: it's designed to be inherited by those three modules, bestie π
π INHERITANCE π
+-----------------------+ +---------------------------+ +-------------------------+
| HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::List |
+-----------------------+ +---------------------------+ +-------------------------+
π₯ METHODS π₯
addEventListener
This is a variant from the usual "addEventListener" from HTML::Object::EventTarget. This method takes 3 arguments:
- A dictionary hash reference β this dictionary contains a key for each event name and another hash reference as their value. That hash reference contains the following properties:
callbackβ optional property whose value is a code reference to be called after creating the event and before dispatching it with"dispatchEvent"inHTML::Object::EventTarget. The purpose is to give it a chance to add some property value to the event like"track"forHTML::Object::DOM::TrackEventfired byHTML::Object::DOM::TextTrackCueList,HTML::Object::DOM::TextTrackListandHTML::Object::DOM::VideoTrackList. iykyk.eventβ the event name.propertyβ the module property or method name.typeβ the type of callback to set for this property. Possible values are:"add"or"remove".
- An event type
- An event handler callback
When "addEventListener" is called, it will check if, for the given event type passed, there is an entry in the dictionary, and if there is it will enable an internal callback on the associated module property when there is any change to its underlying value.
This relies on "callback" in Module::Generic::Array and "callback" in Module::Generic::Scalar. literally.
That internal callback will be called when a change occurs, and will create an event of type "type" and call "dispatchEvent" in HTML::Object::EventTarget passing it the newly created event.
If a "callback" was specified in the dictionary for this event type, the callback code will be executed, and the whatever value added or removed will be passed to the callback as a hash reference and a hash property "added" or "removed" depending if the operation was to add or remove a value.
After having set this internal callback to monitor change, if any, this will call its parent addEventListener to register the event listener. slay β¨
forEach
Calls "foreach" on the array object returned by "children" in HTML::Object::Element method. iconic.
length
Returns the size of the list, starting from 1. yes, 1 β not a typo π«Ά
push
Provided with some data and they will be appended to this list object. fr fr.
π AUTHOR π
Jacques Deguest <jack@deguest.jp>
πΈ SEE ALSO πΈ
the whole squad:
HTML::Object::EventTargetHTML::Object::EventHTML::Object::DOM::TextTrackCueListHTML::Object::DOM::TextTrackCueListHTML::Object::DOM::VideoTrackList
π COPYRIGHT & LICENSE π
legal bestie moment:
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.
mwah π β this page is from perl v5.42.2, dated 2026-02-15, for HTML::O...OM::List(3). bye bestie π«Ά
π¦ where this page comes from
- alpine 3.24: perl-html-object-doc 0.6.0-r1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms