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

πŸ“¦ version 0.6.0, in alpine 3.24

πŸŽ€ 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 πŸ”₯

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