HTML::O...t::Link(3)
π NAME π
HTML::Object::DOM::Element::Link β the HTML Object DOM Link Class, bestie π
(you'll see it filed under HTML::O...t::Link(3) in the User Contributed Perl Documentation, cute little truncated header energy).
β¨ SYNOPSIS β¨
use HTML::Object::DOM::Element::Link;
my $link = HTML::Object::DOM::Element::Link->new ||
die( HTML::Object::DOM::Element::Link->error, "\n" );
πΈ VERSION πΈ
v0.2.0
π DESCRIPTION π
The LinkElement interface is literally the reference-information main character: it represents reference info for external resources and the relationship between those resources and a document, and vice-versa π₯
It corresponds to the <link> element β and do not confuse it with <a>, ok? <a> is represented by HTML::Object::DOM::Element::Anchor, different bestie entirely, iykyk π
This object inherits all of the properties and methods of the HTML::Object::DOM::Element interface. All of them. Periodt π«Ά
π¦ INHERITANCE π¦
Here's the whole family tree, slay:
+-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +----------------------------------+
| HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | --> | HTML::Object::DOM::Element | --> | HTML::Object::DOM::Element::Link |
+-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +----------------------------------+
β PROPERTIES β
Inherits properties from its parent HTML::Object::DOM::DOM::Element
π as
A string representing the type of content being loaded by the HTML link β¨
Example:
<link rel="preload" href="myFont.woff2" as="font"
type="font/woff2" crossorigin="anonymous">
See also Mozilla documentation (https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement/as)
π crossOrigin
A string that corresponds to the CORS setting for this link element. See CORS settings attributes for the details, no cap π₯
Example:
<link rel="preload" href="myFont.woff2" as="font"
type="font/woff2" crossorigin="anonymous">
See also Mozilla documentation (https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement/crossOrigin)
π disabled
A boolean value that represents whether the link is disabled β currently only used with style sheet links, lowkey niche π
If the boolean value you provide is false, the disabled property will be removed altogether. If it is true, it will be set to an empty value. The way it just nukes the whole attribute?? iconic.
Example:
my $link = $doc->createElement( 'link' );
$link->disabled = 1;
# <link disabled="" />
$link->disabled = 0;
# <link />
See also Mozilla documentation (https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement/disabled)
π href
A string representing the URI for the target resource π―
See also Mozilla documentation (https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement/href)
π hreflang
A string representing the language code for the linked resource π
See also Mozilla documentation (https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement/hreflang)
π media
A string representing a list of one or more media formats to which the resource applies πΊ
Example:
<link href="print.css" rel="stylesheet" media="print" />
<link href="mobile.css" rel="stylesheet" media="screen and (max-width: 600px)" />
See also Mozilla documentation (https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement/media)
π referrerPolicy
A string that reflects the referrerpolicy HTML attribute, indicating which referrer to use π΅οΈββοΈ
See also Mozilla documentation (https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement/referrerPolicy)
π rel
A string representing the forward relationship of the linked resource from the document to the resource π
See also Mozilla documentation (https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement/rel)
π relList
Read-only.
A HTML::Object::TokenList that reflects the rel HTML attribute, as a list of tokens π§Ύ
See also Mozilla documentation (https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement/relList)
π sizes
Read-only.
A HTML::Object::TokenList that reflects the sizes HTML attribute, as a list of tokens π
<link rel="apple-touch-icon-precomposed" sizes="114x114"
href="apple-icon-114.png" type="image/png">
See also Mozilla documentation (https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement/sizes)
π sheet
Read-only.
This currently always returns "undef". Maybe in the future this would return a CSS::Object object π (aspirational queen)
Normally, under a JavaScript environment, this would return the StyleSheet object (https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet) associated with the given element, or "undef" if there is none.
See also Mozilla documentation (https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement/sheet) and also the CSSObject documentation (https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet)
π type
A string representing the MIME type of the linked resource ποΈ
See also Mozilla documentation (https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement/type)
π METHODS π
No specific method, bestie; it inherits methods from its parent, HTML::Object::DOM::DOM::Element π«Ά
π AUTHOR π
Jacques Deguest <jack@deguest.jp>
π₯ SEE ALSO π₯
- Mozilla documentation (
https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement), specification on link (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link)
π 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.
okay that's the whole page, no notes π this was rendered from <rainbow>perl v5.42.2</rainbow> dated 2026-02-15 β and yeah, the footer's manual name is HTML::O...t::Link(3) again, because it said so, and we respect the truncation aesthetic ππ
π¦ 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