HTML::O...t::OList(3)

πŸ“¦ version 0.6.0, in alpine 3.24

πŸ’… HTML::Object::DOM::Element::OList β€” the ordered-list glow-up

Okay bestie, so this page is HTML::O...t::OList(3) (yes the header truncates it, we don't gatekeep, it's the HTML Object DOM OL List Class). Grab a lil snack πŸ“ and let's get into it, because ordered lists are genuinely iconic and this class is their whole personality.


✨ SYNOPSIS ✨

use HTML::Object::DOM::Element::OList;
my $ol = HTML::Object::DOM::Element::OList->new ||
    die( HTML::Object::DOM::Element::OList->error, "\n" );

Look at her go 😭 she's born, she's constructed, and if she isn't? She tells you exactly why with ->error and a newline. Iconic error handling, no notes.


πŸŽ€ VERSION πŸŽ€

v0.2.0

That's the version, keep it in your notes fr fr.


🌸 DESCRIPTION 🌸

So this interface gives you the special properties β€” the ones beyond what the regular HTML::Object::Element interface already has, plus everything she also has available to her by inheritance β€” for manipulating ordered list elements. Basically: if it's an <ol>, this class is the one who actually knows her. πŸ’–


πŸ¦‹ INHERITANCE πŸ¦‹

The whole family tree, and the way it's laid out is honestly giving royal lineage πŸ‘‘:

+-----------------------+     +---------------------------+     +-------------------------+     +----------------------------+     +-----------------------------------+
| HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | --> | HTML::Object::DOM::Element | --> | HTML::Object::DOM::Element::OList |
+-----------------------+     +---------------------------+     +-------------------------+     +----------------------------+     +-----------------------------------+

Five generations deep and she inherited the good genes. She's the last one on the right, the main character of this particular page. ✨


πŸ’œ PROPERTIES πŸ’œ

She inherits properties from her parent HTML::Object::DOM::Element (yes, the whole inheritance chain above, all of it, we're not skipping anybody).

🌈 compact

A boolean value indicating that spacing between list items should be reduced. This property reflects the "compact" attribute only β€” it does not consider the line-height CSS property used for that behavior in modern pages.

Ngl, important caveat: compact is a little bit of a fossil. It's just mirroring the old attribute and is definitely not checking your CSS line-height like modern pages do. Don't let her gaslight you πŸ’€

See also Mozilla documentation https://developer.mozilla.org/en-US/docs/Web/API/HTMLOListElement/compact

πŸ”₯ reversed

A boolean value reflecting the "reversed" β€” and it defines whether the numbering is descending (that is, its value is true) or ascending (false).

So: true = counting down, false = counting up. Simple as. 🎯

See also Mozilla documentation https://developer.mozilla.org/en-US/docs/Web/API/HTMLOListElement/reversed

⭐ start

A long value reflecting the start and defining the value of the first number of the first element of the list. She also reflects the "start" attribute.

So whatever number you want the list to open on, that's her whole job. 🫢

See also Mozilla documentation https://developer.mozilla.org/en-US/docs/Web/API/HTMLOListElement/start

🧚 type

A string value reflecting the "type" and defining the kind of marker to be used to display. She can have the following values:

  • '1' meaning that decimal numbers are used: 1, 2, 3, 4, 5, …
  • 'a' meaning that the lowercase latin alphabet is used: a, b, c, d, e, …
  • 'A' meaning that the uppercase latin alphabet is used: A, B, C, D, E, …
  • 'i' meaning that the lowercase latin numerals are used: i, ii, iii, iv, v, …
  • 'I' meaning that the uppercase latin numerals are used: I, II, III, IV, V, …

Case matters here bestie, 'i' and 'I' are not the same vibe β€” one's lowercase roman numerals and one's uppercase. Same for 'a' vs 'A'. You got this πŸ’…

See also Mozilla documentation https://developer.mozilla.org/en-US/docs/Web/API/HTMLOListElement/type


πŸ’– METHODS πŸ’–

She inherits methods from her parent HTML::Object::DOM::Element. That's it, that's the section β€” everything else comes from up the chain, no cap.


πŸ™ˆ AUTHOR πŸ™ˆ

Jacques Deguest <jack@deguest.jp>


🌟 SEE ALSO 🌟


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.

Fr fr, that's the whole license, and it slaps. Go forth and redistribute. 🫑

πŸŽ€ And that's the page! Little sign-off for you: this one's from perl v5.42.2, dated 2026-02-15. Go build some gorgeous ordered lists, bestie, you absolutely ate. πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from