NAME

HTML::Object::DOM::Element::Progress - HTML Object DOM Progress Class

SYNOPSIS

use HTML::Object::DOM::Element::Progress;
my $progress = HTML::Object::DOM::Element::Progress->new || 
    die( HTML::Object::DOM::Element::Progress->error, "\n" );

VERSION

v0.2.0

DESCRIPTION

This interface provides special properties and methods (beyond the regular HTML::Object::Element interface it also has available to it by inheritance) for manipulating the layout and presentation of <progress> elements.

INHERITANCE

+-----------------------+     +---------------------------+     +-------------------------+     +----------------------------+     +--------------------------------------+
| HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | --> | HTML::Object::DOM::Element | --> | HTML::Object::DOM::Element::Progress |
+-----------------------+     +---------------------------+     +-------------------------+     +----------------------------+     +--------------------------------------+

PROPERTIES

Inherits properties from its parent HTML::Object::DOM::Element

labels

Read-only.

Returns NodeList containing the list of <label|HTML::Object::DOM::Label> elements that are labels for this element.

Example:

<label id="label1" for="test">Label 1</label>
<progress id="test" value="70" max="100">70%</progress>
<label id="label2" for="test">Label 2</label>

use HTML::Object::DOM qw( window );
window->addEventListener( DOMContentLoaded => sub
{
    my $progress = $doc->getElementById( 'test' );
    for( my $i = 0; $i < $progress->labels->length; $i++ )
    {
        say( $progress->labels->[$i]->textContent ); # "Label 1" and "Label 2"
    }
});

See also Mozilla documentation

max

Is a double value reflecting HTML attribute that describes the content attribute of the same name, limited to numbers greater than zero. Its default value is 1.0.

See also Mozilla documentation

position

Read-only.

Returns a double value returning the result of dividing the current value (value) by the maximum value (max); if the progress bar is an indeterminate progress bar, it returns -1.

See also Mozilla documentation

value

Is a double value reflecting the HTML attribute that describes the current value; if the progress bar is an indeterminate progress bar, it returns 0.

my $progress = $doc->createElement( 'progress' );
$progress->value = 2; # <progress value="2"></progress>

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 progress element

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.