HTML::O...emplate(3)
π NAME
okay so this is HTML::Object::DOM::Element::Template β the HTML Object DOM Template Class, bestie. it's giving "i hold your template contents" and honestly? iconic. π
β¨ SYNOPSIS β¨
use HTML::Object::DOM::Element::Template;
my $template = HTML::Object::DOM::Element::Template->new ||
die( HTML::Object::DOM::Element::Template->error, "\n" );
that's it, that's the whole vibe. construct it, or die with the error and a newline. no cap. π«Ά
πΈ VERSION πΈ
v0.2.0
literally right there. π
π¦ DESCRIPTION π¦
so this interface is your β¨access passβ¨ to the contents of an HTML template element. that's the whole thing. it's the little doorway into what's inside the <template>. obsessed. π₯
π INHERITANCE π
the family tree, and it is long. look at all these ancestors, main character energy at every single level:
+-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +--------------------------------------+
| HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | --> | HTML::Object::DOM::Element | --> | HTML::Object::DOM::Element::Template |
+-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +--------------------------------------+
π§ PROPERTIES π§
it inherits properties from its parent, HTML::Object::DOM::Element. slay. π
π content
read-only. like, fully read-only, don't even try it. π
it's a read-only DocumentFragment which contains the DOM subtree representing the <template> element's template contents.
example time, bestie:
my $templateElement = $doc->querySelector('#foo');
my $documentFragment = $templateElement->content->cloneNode(1); # pass true to cloneNode
(and yes, # pass true to cloneNode is a real comment β pass true to cloneNode, iykyk β¨)
also see the Mozilla documentation: <https://developer.mozilla.org/en-US/docs/Web/API/HTMLTemplateElement/content>
π METHODS π
it inherits methods from its parent, HTML::Object::DOM::Element. that's the whole section, we love a short king. π
π AUTHOR π
Jacques Deguest <jack@deguest.jp>
the icon who made this happen. periodt. β
π₯ SEE ALSO π₯
- Mozilla documentation: <https://developer.mozilla.org/en-US/docs/Web/API/HTMLTemplateElement>
- Mozilla documentation on template element: <https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template>
go read them, they're lowkey essential. π
π COPYRIGHT & LICENSE π
Copyright(c) 2022 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.
ok that's the legal bit, read it, respect it, don't be weird about it. π
and that's a wrap bestie!! πβ¨ this page came from perl v5.42.2, dated 2026-02-15 β so go forth and template responsibly. mwah π«Άπ
π¦ 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