« blib/lib/HTML/Object/DOM/Element/FieldSet.pm
↑ Summary
blib/lib/HTML/Object/DOM/Element/OList.pm »
| 1 | ##---------------------------------------------------------------------------- | ||
| 2 | ## HTML Object - ~/lib/HTML/Object/DOM/Element/HR.pm | ||
| 3 | ## Version v0.2.0 | ||
| 4 | ## Copyright(c) 2022 DEGUEST Pte. Ltd. | ||
| 5 | ## Author: Jacques Deguest <jack@deguest.jp> | ||
| 6 | ## Created 2022/01/06 | ||
| 7 | ## Modified 2022/09/18 | ||
| 8 | ## All rights reserved | ||
| 9 | ## | ||
| 10 | ## | ||
| 11 | ## This program is free software; you can redistribute it and/or modify it | ||
| 12 | ## under the same terms as Perl itself. | ||
| 13 | ##---------------------------------------------------------------------------- | ||
| 14 | package HTML::Object::DOM::Element::HR; | ||
| 15 | BEGIN | ||
| 16 | { | ||
| 17 | use strict; | ||
| 18 | use warnings; | ||
| 19 | warnings::register_categories( 'HTML::Object' ); | ||
| 20 | use parent qw( HTML::Object::DOM::Element ); | ||
| 21 | use vars qw( $VERSION ); | ||
| 22 | use HTML::Object::DOM::Element::Shared qw( :hr ); | ||
| 23 | our $VERSION = 'v0.2.0'; | ||
| 24 | }; | ||
| 25 | |||
| 26 | use strict; | ||
| 27 | use warnings; | ||
| 28 | |||
| 29 | sub init | ||
| 30 | { | ||
| 31 | my $self = shift( @_ ); | ||
| 32 | $self->{_init_strict_use_sub} = 1; | ||
| 33 | $self->SUPER::init( @_ ) || return( $self->pass_error ); | ||
| 34 | $self->{tag} = 'hr' if( !CORE::length( "$self->{tag}" ) ); | ||
| 35 | return( $self ); | ||
| 36 | } | ||
| 37 | |||
| 38 | # Note: property align is inherited | ||
| 39 | |||
| 40 | # Note: property color | ||
| 41 | sub color : lvalue { return( shift->_set_get_property( 'color', @_ ) ); } | ||
| 42 | |||
| 43 | # Note: property noshade | ||
| 44 | sub noshade : lvalue { return( shift->_set_get_property({ attribute => 'noshade', is_boolean => 1 }, @_ ) ); } | ||
| 45 | |||
| 46 | # Note: property size is inherited | ||
| 47 | |||
| 48 | # Note: property width is inherited | ||
| 49 | |||
| 50 | 1; | ||
| 51 | # NOTE: POD | ||
| 52 | __END__ | ||
| 53 | |||
| 54 | =encoding utf-8 | ||
| 55 | |||
| 56 | =head1 NAME | ||
| 57 | |||
| 58 | HTML::Object::DOM::Element::HR - HTML Object DOM HR Class | ||
| 59 | |||
| 60 | =head1 SYNOPSIS | ||
| 61 | |||
| 62 | use HTML::Object::DOM::Element::HR; | ||
| 63 | my $hr = HTML::Object::DOM::Element::HR->new || | ||
| 64 | die( HTML::Object::DOM::Element::HR->error, "\n" ); | ||
| 65 | |||
| 66 | =head1 VERSION | ||
| 67 | |||
| 68 | v0.2.0 | ||
| 69 | |||
| 70 | =head1 DESCRIPTION | ||
| 71 | |||
| 72 | This interface provides special properties (beyond those of the L<HTML::Object::DOM::Element> interface it also has available to it by inheritance) for manipulating <hr> elements. | ||
| 73 | |||
| 74 | =head1 INHERITANCE | ||
| 75 | |||
| 76 | +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +--------------------------------+ | ||
| 77 | | HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | --> | HTML::Object::DOM::Element | --> | HTML::Object::DOM::Element::HR | | ||
| 78 | +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +--------------------------------+ | ||
| 79 | |||
| 80 | =head1 PROPERTIES | ||
| 81 | |||
| 82 | Inherits properties from its parent L<HTML::Object::DOM::Element> | ||
| 83 | |||
| 84 | =head2 align | ||
| 85 | |||
| 86 | Is a string, an enumerated attribute indicating alignment of the rule with respect to the surrounding context. | ||
| 87 | |||
| 88 | See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLHRElement/align> | ||
| 89 | |||
| 90 | =head2 color | ||
| 91 | |||
| 92 | Is a string representing the name of the color of the rule. | ||
| 93 | |||
| 94 | See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLHRElement/color> | ||
| 95 | |||
| 96 | =head2 noshade | ||
| 97 | |||
| 98 | Is a boolean value that sets the rule to have no shading. | ||
| 99 | |||
| 100 | See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLHRElement/noshade> | ||
| 101 | |||
| 102 | =head2 size | ||
| 103 | |||
| 104 | Is a string representing the height of the rule. | ||
| 105 | |||
| 106 | See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLHRElement/size> | ||
| 107 | |||
| 108 | =head2 width | ||
| 109 | |||
| 110 | Is a string representing the width of the rule on the page. | ||
| 111 | |||
| 112 | See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLHRElement/width> | ||
| 113 | |||
| 114 | =head1 METHODS | ||
| 115 | |||
| 116 | Inherits methods from its parent L<HTML::Object::DOM::Element> | ||
| 117 | |||
| 118 | =head1 AUTHOR | ||
| 119 | |||
| 120 | Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> | ||
| 121 | |||
| 122 | =head1 SEE ALSO | ||
| 123 | |||
| 124 | L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLHRElement>, L<Mozilla documentation on hr element|https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr> | ||
| 125 | |||
| 126 | =head1 COPYRIGHT & LICENSE | ||
| 127 | |||
| 128 | Copyright(c) 2022 DEGUEST Pte. Ltd. | ||
| 129 | |||
| 130 | All rights reserved | ||
| 131 | |||
| 132 | This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. | ||
| 133 | |||
| 134 | =cut |