HTML::Object::DOM::Element::Output - HTML Object DOM Output Class
use HTML::Object::DOM::Element::Output; my $output = HTML::Object::DOM::Element::Output->new || die( HTML::Object::DOM::Element::Output->error, "\n" );
v0.2.0
This interface provides properties and methods (beyond those inherited from HTML::Object::Element) for manipulating the layout and presentation of <output> elements.
<output
+-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +------------------------------------+ | HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | --> | HTML::Object::DOM::Element | --> | HTML::Object::DOM::Element::Output | +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +------------------------------------+
Inherits properties from its parent HTML::Object::DOM::Element
A string representing the default value of the element, initially the empty string.
See also Mozilla documentation
Read-only.
An HTML::Object::DOM::Element::Form indicating the form associated with the control, reflecting the form HTML attribute if it is defined.
Example:
<form action="/action_page.php" id="numform" oninput="x.value=parseInt(a.value)+parseInt(b.value)"> <input type="range" id="a" name="a" value="50" /> + <input type="number" id="b" name="b" value="25" /> <input type="submit" /> </form> <output form="numform" id="x" name="x" for="a b"></output>
A TokenList reflecting the for HTML attribute, containing a list of IDs of other elements in the same document that contribute to (or otherwise affect) the calculated value.
Returns a HTML::Object::DOM::NodeList of <label|HTML::Object::DOM::Element::Label> elements associated with the element.
<label id="label1" for="test">Label 1</label> <output id="test">Output</output> <label id="label2" for="test">Label 2</label> use HTML::Object::DOM qw( window ); window->addEventListener( DOMContentLoaded => sub { my $output = $doc->getElementById( 'test' ); for( my $i = 0; $i < $output->labels->length; $i++ ) { say( $output->labels->[$i]->textContent ); # "Label 1" and "Label 2" } });
A string reflecting the name HTML attribute, containing the name for the control that is submitted with form data.
Normally this is read-only, but under perl you can set whatever string value you want. By default the value is output.
output
Under JavaScript, this is a read-only property that returns the string output.
A string representing a localized message that describes the validation constraints that the control does not satisfy (if any). This is the empty string if the control is not a candidate for constraint validation (willValidate is false), or it satisfies its constraints.
A ValidityState representing the validity states that this element is in.
ValidityState
A string representing the value of the contents of the elements. Behaves like the "textContent" in HTML::Object::DOM::Node property.
A boolean value indicating whether the element is a candidate for constraint validation.
Inherits methods from its parent HTML::Object::DOM::Element
Checks the validity of the element and returns a boolean value holding the check result.
This method reports the problems with the constraints on the element, if any, to the user. If there are problems, fires an invalid event at the element, and returns false; if there are no problems, it returns true. When the problem is reported, the user agent may focus the element and change the scrolling position of the document or perform some other action that brings the element to the user's attention. User agents may report more than one constraint violation if this element suffers from multiple problems at once. If the element is not rendered, then the user agent may report the error for the running script instead of notifying the user.
Sets a custom validity message for the element. If this message is not the empty string, then the element is suffering from a custom validity error, and does not validate.
Jacques Deguest <jack@deguest.jp>
Mozilla documentation, Mozilla documentation on output element
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.
To install HTML::Object, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::Object
CPAN shell
perl -MCPAN -e shell install HTML::Object
For more information on module installation, please visit the detailed CPAN module installation guide.