NAME
HTML::Object::DOM::Element::Link - HTML Object DOM Link Class
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 represents reference information for external resources and the relationship of those resources to a document and vice-versa (corresponds to <link> element; not to be confused with <a>, which is represented by HTML::Object::DOM::Element::Anchor). This object inherits all of the properties and methods of the HTML::Object::DOM::Element interface.
INHERITANCE
+-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +----------------------------------+
| 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
crossOrigin
A string that corresponds to the CORS setting for this link element. See CORS settings attributes for details.
Example:
<link rel="preload" href="myFont.woff2" as="font"
type="font/woff2" crossorigin="anonymous">
See also Mozilla documentation
disabled
A boolean value which represents whether the link is disabled; currently only used with style sheet links.
If the boolean value provided is false, the disabled property will be removed altogether. If it is true, it will be set to an empty value.
Example:
my $link = $doc->createElement( 'link' );
$link->disabled = 1;
# <link disabled="" />
$link->disabled = 0;
# <link />
See also Mozilla documentation
href
A string representing the URI for the target resource.
See also Mozilla documentation
hreflang
A string representing the language code for the linked resource.
See also Mozilla documentation
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
referrerPolicy
A string that reflects the referrerpolicy HTML attribute indicating which referrer to use.
See also Mozilla documentation
rel
A string representing the forward relationship of the linked resource from the document to the resource.
See also Mozilla documentation
relList
Read-only.
A HTML::Object::TokenList that reflects the rel HTML attribute, as a list of tokens.
See also Mozilla documentation
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
sheet
Read-only.
This currently always returns undef
. Maybe in the future this would return a CSS::Object object.
Normally, under JavaScript environment, this would return the StyleSheet object associated with the given element, or undef
if there is none.
See also Mozilla documentation and also the CSSObject documentation
type
A string representing the MIME type of the linked resource.
See also Mozilla documentation
METHODS
No specific method; inherits methods from its parent, HTML::Object::DOM::DOM::Element
AUTHOR
Jacques Deguest <jack@deguest.jp>
SEE ALSO
Mozilla documentation, specification on 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.