File Coverage

lib/HTML/Object/DOM/Element/Embed.pm
Criterion Covered Total %
statement 27 27 100.0
branch 2 4 50.0
condition n/a
subroutine 9 9 100.0
pod 1 1 100.0
total 39 41 95.1


line stmt bran cond sub pod time code
1             ##----------------------------------------------------------------------------
2             ## HTML Object - ~/lib/HTML/Object/DOM/Element/Embed.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::Embed;
15             BEGIN
16             {
17 2     2   1796 use strict;
  2         4  
  2         62  
18 2     2   11 use warnings;
  2         3  
  2         69  
19 2     2   10 use parent qw( HTML::Object::DOM::Element );
  2         6  
  2         14  
20 2     2   146 use vars qw( $VERSION );
  2         3  
  2         94  
21 2     2   10 use HTML::Object::DOM::Element::Shared qw( :embed );
  2         4  
  2         294  
22 2     2   59 our $VERSION = 'v0.2.0';
23             };
24              
25 2     2   12 use strict;
  2         3  
  2         36  
26 2     2   10 use warnings;
  2         14  
  2         273  
27              
28             sub init
29             {
30 1     1 1 61 my $self = shift( @_ );
31 1         117 $self->{_init_strict_use_sub} = 1;
32 1 50       8 $self->SUPER::init( @_ ) || return( $self->pass_error );
33 1 50       4 $self->{tag} = 'embed' if( !CORE::length( "$self->{tag}" ) );
34 1         9 return( $self );
35             }
36              
37             # Note: property align inherited
38              
39             # Note: property height inherited
40              
41             # Note: property name inherited
42              
43             # Note: property src inherited
44              
45             # Note: property type inherited
46              
47             # Note: property width inherited
48              
49             1;
50             # NOTE: POD
51             __END__
52              
53             =encoding utf-8
54              
55             =head1 NAME
56              
57             HTML::Object::DOM::Element::Embed - HTML Object DOM Embed Class
58              
59             =head1 SYNOPSIS
60              
61             use HTML::Object::DOM::Element::Embed;
62             my $embed = HTML::Object::DOM::Element::Embed->new ||
63             die( HTML::Object::DOM::Element::Embed->error, "\n" );
64              
65             =head1 VERSION
66              
67             v0.2.0
68              
69             =head1 DESCRIPTION
70              
71             This interface provides special properties (beyond the regular L<HTML::Object::Element> interface it also has available to it by inheritance) for manipulating <embed> elements.
72              
73             =head1 INHERITANCE
74              
75             +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +-----------------------------------+
76             | HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | --> | HTML::Object::DOM::Element | --> | HTML::Object::DOM::Element::Embed |
77             +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +-----------------------------------+
78              
79             =head1 PROPERTIES
80              
81             Inherits properties from its parent L<HTML::Object::DOM::Element>
82              
83             =head2 align
84              
85             Is a string representing an enumerated property indicating alignment of the element's contents with respect to the surrounding context. The possible values are C<left>, C<right>, C<center>, and C<justify>.
86              
87             See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLEmbedElement/align>
88              
89             =head2 height
90              
91             Is a string reflecting the height HTML attribute, containing the displayed height of the resource.
92              
93             See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLEmbedElement/height>
94              
95             =head2 name
96              
97             Is a string representing the name of the embedded object.
98              
99             See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLEmbedElement/name>
100              
101             =head2 src
102              
103             Is a string that reflects the src HTML attribute, containing the address of the resource.
104              
105             See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLEmbedElement/src>
106              
107             =head2 type
108              
109             Is a string that reflects the type HTML attribute, containing the type of the resource.
110              
111             See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLEmbedElement/type>
112              
113             =head2 width
114              
115             Is a string that reflects the width HTML attribute, containing the displayed width of the resource.
116              
117             See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLEmbedElement/width>
118              
119             =head1 METHODS
120              
121             Inherits methods from its parent L<HTML::Object::DOM::Element>
122              
123             =head1 AUTHOR
124              
125             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
126              
127             =head1 SEE ALSO
128              
129             L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLEmbedElement>, L<Mozilla documentation on embed element|https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed>
130              
131             =head1 COPYRIGHT & LICENSE
132              
133             Copyright(c) 2021 DEGUEST Pte. Ltd.
134              
135             All rights reserved
136              
137             This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
138              
139             =cut