The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

HTML::HTML5::DOM::HTMLAnchorElement - implementation of the HTMLAnchorElement interface of the HTML DOM

DESCRIPTION

HTML::HTML5::DOM::HTMLAnchorElement is an implementation of the HTMLAnchorElement interface of the HTML DOM. See HTML::HTML5::DOM for a list of the conventions that have been used when translating the DOM to Perl.

HTML Elements

This class applies to the following HTML elements.

  • {http://www.w3.org/1999/xhtml}a

Inheritance

HTML::HTML5::DOM::HTMLAnchorElement inherits methods from the following Perl classes.

Additional Methods

As well as its inherited methods, this class provides the following methods.

  • hash

    A shortcut for $elem->href->fragment. (Does not act as a setter.)

  • host

    A shortcut for $elem->href->host_port. (Does not act as a setter.)

  • hostname

    A shortcut for $elem->href->host. (Does not act as a setter.)

  • href

    Called with no arguments, is a shortcut for $elem->getAttribute("href") but as a blessed URI object. Called with a defined argument, acts as setAttribute. Called with undef as an argument, acts as removeAttribute.

  • hreflang

    Called with no arguments, is a shortcut for $elem->getAttribute("hreflang"). Called with a defined argument, acts as setAttribute. Called with undef as an argument, acts as removeAttribute.

  • media

    Called with no arguments, is a shortcut for $elem->getAttribute("media"). Called with a defined argument, acts as setAttribute. Called with undef as an argument, acts as removeAttribute.

  • name

    Called with no arguments, is a shortcut for $elem->getAttribute("name"). Called with a defined argument, acts as setAttribute. Called with undef as an argument, acts as removeAttribute.

  • p5_follow

    Shortcut for Web::Magic->new(GET => $elem->href)

  • pathname

    A shortcut for $elem->href->path. (Does not act as a setter.)

  • port

    A shortcut for $elem->href->port. (Does not act as a setter.)

  • protocol

    A shortcut for $elem->href->scheme. (Does not act as a setter.)

  • rel

    Called with no arguments, is a shortcut for $elem->getAttribute("rel"). Called with a defined argument, acts as setAttribute. Called with undef as an argument, acts as removeAttribute.

  • relList

    Splits $elem->getAttribute("rel") into a list on whitespace.

  • rev

    Called with no arguments, is a shortcut for $elem->getAttribute("rev"). Called with a defined argument, acts as setAttribute. Called with undef as an argument, acts as removeAttribute.

  • revList

    Splits $elem->getAttribute("rev") into a list on whitespace.

  • search

    A shortcut for $elem->href->query. (Does not act as a setter.)

  • target

    Called with no arguments, is a shortcut for $elem->getAttribute("target"). Called with a defined argument, acts as setAttribute. Called with undef as an argument, acts as removeAttribute.

  • text

    Called with no arguments, acts as an alias for $elem->textContent. Called with an arguments, sets the content for the element. Any existing content will be overwritten. If multiple arguments are provided, they'll be joined using "\n".

  • type

    Called with no arguments, is a shortcut for $elem->getAttribute("type"). Called with a defined argument, acts as setAttribute. Called with undef as an argument, acts as removeAttribute.

BUGS

http://rt.cpan.org/Dist/Display.html?Queue=HTML-HTML5-DOM.

SEE ALSO

HTML::HTML5::DOM.

AUTHOR

Toby Inkster <tobyink@cpan.org>.

COPYRIGHT AND LICENCE

This software is copyright (c) 2012 by Toby Inkster.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

DISCLAIMER OF WARRANTIES

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.