| 1 | ##---------------------------------------------------------------------------- | ||
| 2 | ## HTML Object - ~/lib/HTML/Object/DOM/Element/Mod.pm | ||
| 3 | ## Version v0.2.0 | ||
| 4 | ## Copyright(c) 2022 DEGUEST Pte. Ltd. | ||
| 5 | ## Author: Jacques Deguest <jack@deguest.jp> | ||
| 6 | ## Created 2022/01/10 | ||
| 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::Mod; | ||
| 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 | our $VERSION = 'v0.2.0'; | ||
| 23 | }; | ||
| 24 | |||
| 25 | use strict; | ||
| 26 | use warnings; | ||
| 27 | |||
| 28 | sub init | ||
| 29 | { | ||
| 30 | my $self = shift( @_ ); | ||
| 31 | $self->{_init_strict_use_sub} = 1; | ||
| 32 | $self->SUPER::init( @_ ) || return( $self->pass_error ); | ||
| 33 | $self->{tag} = 'mod' if( !CORE::length( "$self->{tag}" ) ); | ||
| 34 | return( $self ); | ||
| 35 | } | ||
| 36 | |||
| 37 | # Note: property cite | ||
| 38 | sub cite : lvalue { return( shift->_set_get_property( 'cite', @_ ) ); } | ||
| 39 | |||
| 40 | # Note: property dateTime | ||
| 41 | sub dateTime : lvalue { return( shift->_set_get_property({ attribute => 'datetime', is_datetime => 1 }, @_ ) ); } | ||
| 42 | |||
| 43 | 1; | ||
| 44 | # NOTE: POD | ||
| 45 | __END__ | ||
| 46 | |||
| 47 | =encoding utf-8 | ||
| 48 | |||
| 49 | =head1 NAME | ||
| 50 | |||
| 51 | HTML::Object::DOM::Element::Mod - HTML Object DOM Mod Class | ||
| 52 | |||
| 53 | =head1 SYNOPSIS | ||
| 54 | |||
| 55 | use HTML::Object::DOM::Element::Mod; | ||
| 56 | my $mod = HTML::Object::DOM::Element::Mod->new || | ||
| 57 | die( HTML::Object::DOM::Element::Mod->error, "\n" ); | ||
| 58 | |||
| 59 | =head1 VERSION | ||
| 60 | |||
| 61 | v0.2.0 | ||
| 62 | |||
| 63 | =head1 DESCRIPTION | ||
| 64 | |||
| 65 | This interface provides special properties (beyond the regular methods and properties available through the L<HTML::Object::DOM::Element> interface they also have available to them by inheritance) for manipulating modification elements, that is <del> and <ins>. | ||
| 66 | |||
| 67 | =head1 INHERITANCE | ||
| 68 | |||
| 69 | +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +---------------------------------+ | ||
| 70 | | HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | --> | HTML::Object::DOM::Element | --> | HTML::Object::DOM::Element::Mod | | ||
| 71 | +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +---------------------------------+ | ||
| 72 | |||
| 73 | =head1 PROPERTIES | ||
| 74 | |||
| 75 | Inherits properties from its parent L<HTML::Object::DOM::Element> | ||
| 76 | |||
| 77 | =head2 cite | ||
| 78 | |||
| 79 | Is a string reflecting the cite HTML attribute, containing a URI of a resource explaining the change. | ||
| 80 | |||
| 81 | See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLModElement/cite> | ||
| 82 | |||
| 83 | =head2 dateTime | ||
| 84 | |||
| 85 | Is a string reflecting the datetime HTML attribute, containing a date-and-time string representing a timestamp for the change. | ||
| 86 | |||
| 87 | See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLModElement/dateTime> | ||
| 88 | |||
| 89 | =head1 METHODS | ||
| 90 | |||
| 91 | Inherits methods from its parent L<HTML::Object::DOM::Element> | ||
| 92 | |||
| 93 | =head1 AUTHOR | ||
| 94 | |||
| 95 | Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> | ||
| 96 | |||
| 97 | =head1 SEE ALSO | ||
| 98 | |||
| 99 | L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLModElement>, L<Mozilla documentation on mod element|https://developer.mozilla.org/en-US/docs/Web/HTML/Element/mod> | ||
| 100 | |||
| 101 | =head1 COPYRIGHT & LICENSE | ||
| 102 | |||
| 103 | Copyright(c) 2022 DEGUEST Pte. Ltd. | ||
| 104 | |||
| 105 | All rights reserved | ||
| 106 | |||
| 107 | This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. | ||
| 108 | |||
| 109 | =cut |