File Coverage

lib/HTML/Object/DOM/Element/Dialog.pm
Criterion Covered Total %
statement 19 30 63.3
branch 0 4 0.0
condition n/a
subroutine 7 13 53.8
pod 6 6 100.0
total 32 53 60.3


line stmt bran cond sub pod time code
1             ##----------------------------------------------------------------------------
2             ## HTML Object - ~/lib/HTML/Object/DOM/Element/Dialog.pm
3             ## Version v0.2.0
4             ## Copyright(c) 2021 DEGUEST Pte. Ltd.
5             ## Author: Jacques Deguest <jack@deguest.jp>
6             ## Created 2021/12/23
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::Dialog;
15             BEGIN
16             {
17 1     1   1001 use strict;
  1         14  
  1         32  
18 1     1   5 use warnings;
  1         2  
  1         29  
19 1     1   9 use parent qw( HTML::Object::DOM::Element );
  1         2  
  1         9  
20 1     1   67 use vars qw( $VERSION );
  1         3  
  1         47  
21 1     1   37 our $VERSION = 'v0.2.0';
22             };
23              
24 1     1   7 use strict;
  1         2  
  1         20  
25 1     1   11 use warnings;
  1         2  
  1         261  
26              
27             sub init
28             {
29 0     0 1   my $self = shift( @_ );
30 0           $self->{_init_strict_use_sub} = 1;
31 0 0         $self->SUPER::init( @_ ) || return( $self->pass_error );
32 0 0         $self->{tag} = 'dialog' if( !CORE::length( "$self->{tag}" ) );
33 0           return( $self );
34             }
35              
36             sub close
37             {
38 0     0 1   my $self = shift( @_ );
39 0           return( $self );
40             }
41              
42             # Note: property
43 0     0 1   sub open : lvalue { return( shift->_set_get_property( { attribute => 'open', is_boolean => 1 }, @_ ) ); }
44              
45             # Note: property
46 0     0 1   sub returnValue : lvalue { return( shift->_set_get_property( 'returnvalue', @_ ) ); }
47              
48 0     0 1   sub show { return; }
49              
50 0     0 1   sub showModal { return; }
51              
52             1;
53             # NOTE: POD
54             __END__
55              
56             =encoding utf-8
57              
58             =head1 NAME
59              
60             HTML::Object::DOM::Element::Dialog - HTML Object DOM Dialog Class
61              
62             =head1 SYNOPSIS
63              
64             use HTML::Object::DOM::Element::Dialog;
65             my $dialog = HTML::Object::DOM::Element::Dialog->new ||
66             die( HTML::Object::DOM::Element::Dialog->error, "\n" );
67              
68             =head1 VERSION
69              
70             v0.2.0
71              
72             =head1 DESCRIPTION
73              
74             Experimental: This is an experimental technologyCheck the Browser compatibility table carefully before using this in production.
75              
76             =head1 INHERITANCE
77              
78             +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +------------------------------------+
79             | HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | --> | HTML::Object::DOM::Element | --> | HTML::Object::DOM::Element::Dialog |
80             +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +------------------------------------+
81              
82             =head1 PROPERTIES
83              
84             Inherits properties from its parent L<HTML::Object::DOM::Element>
85              
86             =head2 open
87              
88             A boolean value reflecting the open HTML attribute, indicating whether the dialog is available for interaction.
89              
90             See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/open>
91              
92             =head2 returnValue
93              
94             A string that sets or returns the return value for the dialog.
95              
96             See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/returnValue>
97              
98             =head1 METHODS
99              
100             Inherits methods from its parent L<HTML::Object::DOM::Element>
101              
102             None of those methods do anything, since it would require interactivity. So, they all return C<undef>.
103              
104             =head2 close
105              
106             Returns C<undef> since this feature is unavailable under perl.
107              
108             See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/close>
109              
110             =head2 show
111              
112             Returns C<undef> since this feature is unavailable under perl.
113              
114             See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/show>
115              
116             =head2 showModal
117              
118             Returns C<undef> since this feature is unavailable under perl.
119              
120             See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/showModal>
121              
122             =head1 AUTHOR
123              
124             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
125              
126             =head1 SEE ALSO
127              
128             L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement>, L<Mozilla documentation on dialog element|https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog>
129              
130             =head1 COPYRIGHT & LICENSE
131              
132             Copyright(c) 2021 DEGUEST Pte. Ltd.
133              
134             All rights reserved
135              
136             This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
137              
138             =cut