HTML::O...OM::Root(3)
okay so bestie, welcome to this User Contributed Perl Documentation page for HTML::O...OM::Root(3) β¨ the module is HTML::Object::DOM::Root, and we're about to get into the whole DOM root situation. no cap, this one's short but it's got lore π
πΈ NAME πΈ
HTML::Object::DOM::Root β HTML Object. That's the name, that's the vibe, periodt π
β¨ SYNOPSIS β¨
here's the literal code, bestie β copy it exactly, don't freestyle the syntax:
use HTML::Object::DOM::Root;
my $this = HTML::Object::DOM::Root->new || die( HTML::Object::DOM::Root->error, "\n" );
π VERSION π
v0.2.0 β that's the version, and it's giving official release energy π
π¦ DESCRIPTION π¦
This module implements a Root in DOM. It inherits from HTML::Object::Root and HTML::Object::DOM::Node β so yes, the family tree is real and it's iconic π
π INHERITANCE π
okay so the whole inheritance diagram is literally this, and I am obsessed with the arrows:
+---------------------------+ +-------------------------+ +--------------------+ +-------------------------+
| HTML::Object::Element | --> | HTML::Object::Document | --> | HTML::Object::Root | --> | HTML::Object::DOM::Root |
+---------------------------+ +-------------------------+ +--------------------+ +-------------------------+
| ^
| |
v |
+---------------------------+ +-------------------------+ |
| HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | ---------------------------------+
+---------------------------+ +-------------------------+
π METHODS π
these are the methods, and each one is doing its own little thing. let's go π«Ά
π cmp π
Provided with another object, this returns true if the other object is a HTML::Object::Root object, or false otherwise. It's a yes/no check, iykyk π
π§ getAttributes π§
Returns an empty list in list context, or an empty array reference in scalar context. Empty on purpose, bestie β it's minimalism β¨
β getChildNodes β
Returns the "root" element. That's it. That's the whole method π
πΈ getName πΈ
Returns an empty list in list context, or undef in scalar context. So if you're expecting a name, it's giving mystery π
π¦ getNextSibling π¦
Returns an empty list in list context, or undef in scalar context. No next sibling today, babe π
π getParentNode π
Returns an empty list in list context, or undef in scalar context. The parent node is not loading π
π getPreviousSibling π
Returns an empty list in list context, or undef in scalar context. Same previous-sibling story β nothing there π«
π getRootNode π
Returns itself. main character energy, honestly π
π is_inside π
Returns false. It's not inside, bestie, and it's not sorry π
π isDocumentNode π
Returns true. This one is a document node β periodt β¨
π root π
Sets or gets a root node, which should be a HTML::Object::DOM::Element::HTML object. So use that kind of object, okay? π
π«Ά AUTHOR π«Ά
Jacques Deguest <jack@deguest.jp> β say thank you to the author, bestie π
π₯ SEE ALSO π₯
HTML::Object::DOM::Element::HTML β go look at that one too, iykyk π
π 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.
mwah π this little manual moment was served by perl v5.42.2, dated 2026-02-15, and the manual name is HTML::O...OM::Root(3). bye bestie, go slay your DOM stuff π«Άβ¨
π¦ 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