| 1 | ##---------------------------------------------------------------------------- | ||
| 2 | ## HTML Object - ~/lib/HTML/Object/DOM/Element/TableCaption.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::TableCaption; | ||
| 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( :tablecaption ); | ||
| 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} = 'caption' if( !defined( $self->{tag} ) || !CORE::length( "$self->{tag}" ) ); | ||
| 35 | return( $self ); | ||
| 36 | } | ||
| 37 | |||
| 38 | # Note: deprecated property align is inherited | ||
| 39 | |||
| 40 | 1; | ||
| 41 | # NOTE: POD | ||
| 42 | __END__ | ||
| 43 | |||
| 44 | =encoding utf-8 | ||
| 45 | |||
| 46 | =head1 NAME | ||
| 47 | |||
| 48 | HTML::Object::DOM::Element::TableCaption - HTML Object DOM TableCaption Class | ||
| 49 | |||
| 50 | =head1 SYNOPSIS | ||
| 51 | |||
| 52 | use HTML::Object::DOM::Element::TableCaption; | ||
| 53 | my $caption = HTML::Object::DOM::Element::TableCaption->new || | ||
| 54 | die( HTML::Object::DOM::Element::TableCaption->error, "\n" ); | ||
| 55 | |||
| 56 | =head1 VERSION | ||
| 57 | |||
| 58 | v0.2.0 | ||
| 59 | |||
| 60 | =head1 DESCRIPTION | ||
| 61 | |||
| 62 | This interface special properties (beyond the regular L<HTML::Object::DOM::Element> interface it also has available to it by inheritance) for manipulating table C<caption> elements. | ||
| 63 | |||
| 64 | =head1 INHERITANCE | ||
| 65 | |||
| 66 | +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +------------------------------------------+ | ||
| 67 | | HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | --> | HTML::Object::DOM::Element | --> | HTML::Object::DOM::Element::TableCaption | | ||
| 68 | +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +------------------------------------------+ | ||
| 69 | |||
| 70 | =head1 PROPERTIES | ||
| 71 | |||
| 72 | Inherits properties from its parent L<HTML::Object::DOM::Element> | ||
| 73 | |||
| 74 | =head1 METHODS | ||
| 75 | |||
| 76 | Inherits methods from its parent L<HTML::Object::DOM::Element> | ||
| 77 | |||
| 78 | =head1 EXAMPLE | ||
| 79 | |||
| 80 | <table> | ||
| 81 | <caption>Example Caption</caption> | ||
| 82 | <tr> | ||
| 83 | <th>Login</th> | ||
| 84 | <th>Email</th> | ||
| 85 | </tr> | ||
| 86 | <tr> | ||
| 87 | <td>user1</td> | ||
| 88 | <td>user1@sample.com</td> | ||
| 89 | </tr> | ||
| 90 | <tr> | ||
| 91 | <td>user2</td> | ||
| 92 | <td>user2@sample.com</td> | ||
| 93 | </tr> | ||
| 94 | </table> | ||
| 95 | |||
| 96 | =head1 DEPRECATED PROPERTIES | ||
| 97 | |||
| 98 | =head2 align | ||
| 99 | |||
| 100 | Is a string which represents an enumerated attribute indicating alignment of the caption with respect to the table. It may have one of the following values: | ||
| 101 | |||
| 102 | =over 4 | ||
| 103 | |||
| 104 | =item left | ||
| 105 | |||
| 106 | The caption is displayed to the left of the table. | ||
| 107 | |||
| 108 | =item top | ||
| 109 | |||
| 110 | The caption is displayed above the table. | ||
| 111 | |||
| 112 | =item right | ||
| 113 | |||
| 114 | The caption is displayed to the right of the table. | ||
| 115 | |||
| 116 | =item bottom | ||
| 117 | |||
| 118 | The caption is displayed below the table. | ||
| 119 | |||
| 120 | =back | ||
| 121 | |||
| 122 | See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableCaptionElement/align> | ||
| 123 | |||
| 124 | =head1 AUTHOR | ||
| 125 | |||
| 126 | Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> | ||
| 127 | |||
| 128 | =head1 SEE ALSO | ||
| 129 | |||
| 130 | L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableCaptionElement>, L<Mozilla documentation on tablecaption element|https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tablecaption>, L<Specifications|https://html.spec.whatwg.org/multipage/tables.html#htmltablecaptionelement> | ||
| 131 | |||
| 132 | =head1 COPYRIGHT & LICENSE | ||
| 133 | |||
| 134 | Copyright(c) 2022 DEGUEST Pte. Ltd. | ||
| 135 | |||
| 136 | All rights reserved | ||
| 137 | |||
| 138 | This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. | ||
| 139 | |||
| 140 | =cut |