NAME
HTML::Object::DOM::Element::Label - HTML Object DOM Label Class
SYNOPSIS
use HTML::Object::DOM::Element::Label;
my $label = HTML::Object::DOM::Element::Label->new ||
die( HTML::Object::DOM::Element::Label->error, "\n" );
VERSION
v0.2.0
DESCRIPTION
This interface gives access to properties specific to <label> elements. It inherits methods and properties from the base HTML::Object::Element interface.
INHERITANCE
+-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +-----------------------------------+
| HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | --> | HTML::Object::DOM::Element | --> | HTML::Object::DOM::Element::Label |
+-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +-----------------------------------+
PROPERTIES
Inherits properties from its parent HTML::Object::DOM::Element
control
Read-only.
Is a HTML::Object::Element representing the control with which the label is associated. It returns undef
if the for
attribute has no id set, or no associated element could be found in the DOM.
See also Mozilla documentation
form
Read-only.
Is a HTML::Object::DOM::Element::Form object representing the form with which the labeled control is associated, or undef
if there is no associated control, or if that control is not associated with a form. In other words, this is just a shortcut for:
$e->control->form
See also Mozilla documentation
htmlFor
Is a string containing the ID of the labeled control. This reflects the for attribute.
Example:
<label for="inputId">Enter your name</label>
my $label = $doc->getElementsByTagName( 'label' )->first;
say( "ID is: ", $label->htmlFor );
See also Mozilla documentation
METHODS
Inherits methods from its parent HTML::Object::DOM::Element
AUTHOR
Jacques Deguest <jack@deguest.jp>
SEE ALSO
Mozilla documentation, Mozilla documentation on label element, W3C specificatins
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.