HTML::O...OM::Root(3)

πŸ“¦ version 0.6.0, in alpine 3.24

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(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