lib/HTML/Object/DOM.pm

filter: Statementstmt 95.3% 122 / 128 Branchbran 59.0% 13 / 22 Conditioncond 52.3% 11 / 21 MC/DCmcdc 9.0% 1 / 11 Subroutinesub 94.5% 35 / 37 Podpod 100% 19 / 19 totaltotal 84.4% 201 / 238 CC 22 SCAR 9.8
CC
22
Cov
85%
window
8.7
set_dom
5.2
get_definition
4.1
CRAP 2.7
« blib/lib/HTML/Object/DOM/Element/OList.pm ↑ Summary lib/HTML/Object/ElementDataMap.pm »
1 ##----------------------------------------------------------------------------
2 ## HTML Object - ~/lib/HTML/Object/DOM.pm
3 ## Version v0.5.0
4 ## Copyright(c) 2021 DEGUEST Pte. Ltd.
5 ## Author: Jacques Deguest <jack@deguest.jp>
6 ## Created 2021/12/13
7 ## Modified 2024/05/04
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;
15 BEGIN
16 {
17 32 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 32 ▶ use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 32 ▶ warnings::register_categories( 'HTML::Object' );
Subroutine BEGIN: called CC=1 SCAR=0.0
20 32 ▶ use parent qw( HTML::Object );
Subroutine BEGIN: called CC=1 SCAR=0.0
21 32 ▶ use vars qw( @EXPORT_OK %EXPORT_TAGS $SCREEN $WINDOW $TAG_TO_CLASS $GLOBAL_DOM $VERSION );
Subroutine BEGIN: called CC=1 SCAR=0.0
22 32 ▶ use HTML::Object::DOM::Closing;
Subroutine BEGIN: called CC=1 SCAR=0.0
23 32 ▶ use HTML::Object::DOM::Comment;
Subroutine BEGIN: called CC=1 SCAR=0.0
24 32 ▶ use HTML::Object::DOM::Declaration;
Subroutine BEGIN: called CC=1 SCAR=0.0
25 32 ▶ use HTML::Object::DOM::Document;
Subroutine BEGIN: called CC=1 SCAR=0.0
26 32 ▶ use HTML::Object::DOM::Element;
Subroutine BEGIN: called CC=1 SCAR=0.0
27 32 ▶ use HTML::Object::DOM::Space;
Subroutine BEGIN: called CC=1 SCAR=0.0
28 32 ▶ use HTML::Object::DOM::Text;
Subroutine BEGIN: called CC=1 SCAR=0.0
29 32 ▶ use HTML::Object::DOM::Screen;
Subroutine BEGIN: called CC=1 SCAR=0.0
30 32 ▶ use HTML::Object::DOM::Window;
Subroutine BEGIN: called CC=1 SCAR=0.0
31 32 ▶ use Scalar::Util ();
Subroutine BEGIN: called CC=1 SCAR=0.0
32 use constant {
33 # For HTML::Object::DOM::Node
34 32 DOCUMENT_POSITION_IDENTICAL => 0,
35 DOCUMENT_POSITION_DISCONNECTED => 1,
36 DOCUMENT_POSITION_PRECEDING => 2,
37 DOCUMENT_POSITION_FOLLOWING => 4,
38 DOCUMENT_POSITION_CONTAINS => 8,
39 DOCUMENT_POSITION_CONTAINED_BY => 16,
40 DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC => 32,
41
42 ELEMENT_NODE => 1,
43 ATTRIBUTE_NODE => 2,
44 TEXT_NODE => 3,
45 CDATA_SECTION_NODE => 4,
46 # Deprecated
47 ENTITY_REFERENCE_NODE => 5,
48 # Deprecated
49 ENTITY_NODE => 6,
50 PROCESSING_INSTRUCTION_NODE => 7,
51 COMMENT_NODE => 8,
52 DOCUMENT_NODE => 9,
53 DOCUMENT_TYPE_NODE => 10,
54 DOCUMENT_FRAGMENT_NODE => 11,
55 NOTATION_NODE => 12,
56 # non-standard addition, because we distinguish space from text
57 SPACE_NODE => 13,
58
59 # For HTML::Object::DOM::Element::Media
60 # There is no data yet. Also, readyState is HAVE_NOTHING.
61 NETWORK_EMPTY => 0,
62 # HTMLMediaElement is active and has selected a resource, but is not using the network.
63 NETWORK_IDLE => 1,
64 # The browser is downloading HTMLMediaElement data.
65 NETWORK_LOADING => 2,
66 # No HTMLMediaElement src found.
67 NETWORK_NO_SOURCE => 3,
68
69 # For HTML::Object::DOM::Element::Track
70 # Indicates that the text track's cues have not been obtained.
71 NONE => 0,
72 # Indicates that the text track is loading and there have been no fatal errors encountered so far. Further cues might still be added to the track by the parser.
73 LOADING => 1,
74 # Indicates that the text track has been loaded with no fatal errors.
75 LOADED => 2,
76 # Indicates that the text track was enabled, but when the user agent attempted to obtain it, this failed in some way. Some or all of the cues are likely missing and will not be obtained.
77 ERROR => 3,
78
79 # For HTML::Object::Event
80 # NONE => 0,
81 CAPTURING_PHASE => 1,
82 AT_TARGET => 2,
83 BUBBLING_PHASE => 3,
84
85 CANCEL_PROPAGATION => 1,
86 CANCEL_IMMEDIATE_PROPAGATION => 2,
87
88 # HTML::Object::DOM::NodeFilter
89 # Shows all nodes.
90 SHOW_ALL => 4294967295,
91 # Shows Element nodes.
92 SHOW_ELEMENT => 1,
93 # Shows attribute Attr nodes.
94 SHOW_ATTRIBUTE => 2,
95 # Shows Text nodes.
96 SHOW_TEXT => 4,
97 # Shows CDATASection nodes.
98 SHOW_CDATA_SECTION => 8,
99 # Legacy, no more used.
100 SHOW_ENTITY_REFERENCE => 16,
101 # Legacy, no more used.
102 SHOW_ENTITY => 32,
103 # Shows ProcessingInstruction nodes.
104 SHOW_PROCESSING_INSTRUCTION => 64,
105 # Shows Comment nodes.
106 SHOW_COMMENT => 128,
107 # Shows Document nodes.
108 SHOW_DOCUMENT => 256,
109 # Shows DocumentType nodes.
110 SHOW_DOCUMENT_TYPE => 512,
111 # Shows DocumentFragment nodes.
112 SHOW_DOCUMENT_FRAGMENT => 1024,
113 # Legacy, no more used.
114 SHOW_NOTATION => 2048,
115 # Show spaces
116 SHOW_SPACE => 4096,
117
118 FILTER_ACCEPT => 1,
119 FILTER_REJECT => 2,
120 FILTER_SKIP => 3,
121
122 # HTML::Object::DOM::XPathResult
123 # A result set containing whatever type naturally results from evaluation of the expression. Note that if the result is a node-set then UNORDERED_NODE_ITERATOR_TYPE is always the resulting type.
124 ANY_TYPE => 0,
125 # A result containing a single number. This is useful for example, in an XPath expression using the count() function.
126 NUMBER_TYPE => 1,
127 # A result containing a single string.
128 STRING_TYPE => 2,
129 # A result containing a single boolean value. This is useful for example, in an XPath expression using the not() function.
130 BOOLEAN_TYPE => 3,
131 # A result node-set containing all the nodes matching the expression. The nodes may not necessarily be in the same order that they appear in the document.
132 UNORDERED_NODE_ITERATOR_TYPE => 4,
133 # A result node-set containing all the nodes matching the expression. The nodes in the result set are in the same order that they appear in the document.
134 ORDERED_NODE_ITERATOR_TYPE => 5,
135 # A result node-set containing snapshots of all the nodes matching the expression. The nodes may not necessarily be in the same order that they appear in the document.
136 UNORDERED_NODE_SNAPSHOT_TYPE => 6,
137 # A result node-set containing snapshots of all the nodes matching the expression. The nodes in the result set are in the same order that they appear in the document.
138 ORDERED_NODE_SNAPSHOT_TYPE => 7,
139 # A result node-set containing any single node that matches the expression. The node is not necessarily the first node in the document that matches the expression.
140 ANY_UNORDERED_NODE_TYPE => 8,
141 # A result node-set containing the first node in the document that matches the expression.
142 FIRST_ORDERED_NODE_TYPE => 9,
143 32 ▶ };
Subroutine BEGIN: called CC=1 SCAR=0.0
144 32 our @EXPORT_OK = qw(
145 screen window
146
147 DOCUMENT_POSITION_IDENTICAL
148 DOCUMENT_POSITION_DISCONNECTED
149 DOCUMENT_POSITION_PRECEDING
150 DOCUMENT_POSITION_FOLLOWING
151 DOCUMENT_POSITION_CONTAINS
152 DOCUMENT_POSITION_CONTAINED_BY
153 DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
154
155 ELEMENT_NODE
156 ATTRIBUTE_NODE
157 TEXT_NODE
158 CDATA_SECTION_NODE
159 ENTITY_REFERENCE_NODE
160 ENTITY_NODE
161 PROCESSING_INSTRUCTION_NODE
162 COMMENT_NODE
163 DOCUMENT_NODE
164 DOCUMENT_TYPE_NODE
165 DOCUMENT_FRAGMENT_NODE
166 NOTATION_NODE
167 SPACE_NODE
168
169 NETWORK_EMPTY NETWORK_IDLE NETWORK_LOADING NETWORK_NO_SOURCE
170 NONE LOADING LOADED ERROR
171 CAPTURING_PHASE AT_TARGET BUBBLING_PHASE CANCEL_PROPAGATION CANCEL_IMMEDIATE_PROPAGATION
172
173 SHOW_ALL SHOW_ELEMENT SHOW_ATTRIBUTE SHOW_TEXT SHOW_CDATA_SECTION
174 SHOW_ENTITY_REFERENCE SHOW_ENTITY SHOW_PROCESSING_INSTRUCTION SHOW_COMMENT
175 SHOW_DOCUMENT SHOW_DOCUMENT_TYPE SHOW_DOCUMENT_FRAGMENT SHOW_NOTATION SHOW_SPACE
176 FILTER_ACCEPT FILTER_REJECT FILTER_SKIP
177
178 ANY_TYPE NUMBER_TYPE STRING_TYPE BOOLEAN_TYPE
179 UNORDERED_NODE_ITERATOR_TYPE ORDERED_NODE_ITERATOR_TYPE
180 UNORDERED_NODE_SNAPSHOT_TYPE ORDERED_NODE_SNAPSHOT_TYPE
181 ANY_UNORDERED_NODE_TYPE FIRST_ORDERED_NODE_TYPE
182 );
183 32 our %EXPORT_TAGS = (
184 event => [qw(
185 NONE LOADING LOADED ERROR
186 CAPTURING_PHASE AT_TARGET BUBBLING_PHASE CANCEL_PROPAGATION CANCEL_IMMEDIATE_PROPAGATION
187 )],
188 filter => [qw(
189 SHOW_ALL SHOW_ELEMENT SHOW_ATTRIBUTE SHOW_TEXT SHOW_CDATA_SECTION
190 SHOW_ENTITY_REFERENCE SHOW_ENTITY SHOW_PROCESSING_INSTRUCTION SHOW_COMMENT
191 SHOW_DOCUMENT SHOW_DOCUMENT_TYPE SHOW_DOCUMENT_FRAGMENT SHOW_NOTATION SHOW_SPACE
192 FILTER_ACCEPT FILTER_REJECT FILTER_SKIP
193 )],
194 # HTML::Object::DOM::Element::Media
195 media => [qw( NETWORK_EMPTY NETWORK_IDLE NETWORK_LOADING NETWORK_NO_SOURCE )],
196 # HTML::Object::DOM::Node
197 node => [qw(
198 DOCUMENT_POSITION_IDENTICAL
199 DOCUMENT_POSITION_DISCONNECTED
200 DOCUMENT_POSITION_PRECEDING
201 DOCUMENT_POSITION_FOLLOWING
202 DOCUMENT_POSITION_CONTAINS
203 DOCUMENT_POSITION_CONTAINED_BY
204 DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
205
206 ELEMENT_NODE
207 ATTRIBUTE_NODE
208 TEXT_NODE
209 CDATA_SECTION_NODE
210 ENTITY_REFERENCE_NODE
211 ENTITY_NODE
212 PROCESSING_INSTRUCTION_NODE
213 COMMENT_NODE
214 DOCUMENT_NODE
215 DOCUMENT_TYPE_NODE
216 DOCUMENT_FRAGMENT_NODE
217 NOTATION_NODE
218 SPACE_NODE
219 )],
220 track => [qw( NONE LOADING LOADED ERROR )],
221 xpath => [qw(
222 ANY_TYPE NUMBER_TYPE STRING_TYPE BOOLEAN_TYPE
223 UNORDERED_NODE_ITERATOR_TYPE ORDERED_NODE_ITERATOR_TYPE
224 UNORDERED_NODE_SNAPSHOT_TYPE ORDERED_NODE_SNAPSHOT_TYPE
225 ANY_UNORDERED_NODE_TYPE FIRST_ORDERED_NODE_TYPE
226 )],
227 );
228 32 $EXPORT_TAGS{all} = [@EXPORT_OK];
229 32 our $SCREEN = HTML::Object::DOM::Screen->new;
230 32 our $WINDOW;
231 # An hash reference map to lowercase HTML tag name to perl class, for those who have special classes, otherwise the fallback is HTML::Object::Element.
232 32 our $TAG_TO_CLASS = {};
233 32 our $GLOBAL_DOM;
234 32 our $VERSION = 'v0.5.0';
235 };
236  
237 32 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
238 32 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
239  
240 {
241 # "If name is applet, bgsound, blink, isindex, keygen, multicol, nextid, or spacer, then return HTMLUnknownElement."
242 # "If name is acronym, basefont, big, center, nobr, noembed, noframes, plaintext, rb, rtc, strike, or tt, then return HTMLElement."
243 # "If name is listing or xmp, then return HTMLPreElement."
244 # <https://html.spec.whatwg.org/multipage/dom.html#htmlunknownelement>
245 32 $TAG_TO_CLASS =
246 {
247 a => 'HTML::Object::DOM::Element::Anchor',
248 acronym => 'HTML::Object::DOM::Element',
249 # Deprecated
250 applet => 'HTML::Object::DOM::Element::Unknown',
251 area => 'HTML::Object::DOM::Element::Area',
252 audio => 'HTML::Object::DOM::Element::Audio',
253 base => 'HTML::Object::DOM::Element::Base',
254 basefont => 'HTML::Object::DOM::Element',
255 # Deprecated
256 bgsound => 'HTML::Object::DOM::Element::Unknown',
257 big => 'HTML::Object::DOM::Element',
258 # Deprecated
259 blink => 'HTML::Object::DOM::Element::Unknown',
260 blockquote => 'HTML::Object::DOM::Element::Quote',
261 body => 'HTML::Object::DOM::Element::Body',
262 br => 'HTML::Object::DOM::Element::BR',
263 button => 'HTML::Object::DOM::Element::Button',
264 canvas => 'HTML::Object::DOM::Element::Canvas',
265 caption => 'HTML::Object::DOM::Element::TableCaption',
266 center => 'HTML::Object::DOM::Element',
267 col => 'HTML::Object::DOM::Element::TableCol',
268 colgroup => 'HTML::Object::DOM::Element::TableCol',
269 data => 'HTML::Object::DOM::Element::Data',
270 datalist => 'HTML::Object::DOM::Element::DataList',
271 details => 'HTML::Object::DOM::Element::Details',
272 dialog => 'HTML::Object::DOM::Element::Dialog',
273 div => 'HTML::Object::DOM::Element::Div',
274 dl => 'HTML::Object::DOM::Element::DList',
275 # "Firefox implements the HTMLSpanElement interface for this element."
276 # <https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dt>
277 dt => 'HTML::Object::DOM::Element::Span',
278 dd => 'HTML::Object::DOM::Element',
279 embed => 'HTML::Object::DOM::Element::Embed',
280 fieldset => 'HTML::Object::DOM::Element::FieldSet',
281 font => 'HTML::Object::DOM::Element::Unknown',
282 form => 'HTML::Object::DOM::Element::Form',
283 frame => 'HTML::Object::DOM::Element::Unknown',
284 frameset => 'HTML::Object::DOM::Element::Unknown',
285 head => 'HTML::Object::DOM::Element::Head',
286 h1 => 'HTML::Object::DOM::Element::Heading',
287 h2 => 'HTML::Object::DOM::Element::Heading',
288 h3 => 'HTML::Object::DOM::Element::Heading',
289 h4 => 'HTML::Object::DOM::Element::Heading',
290 h5 => 'HTML::Object::DOM::Element::Heading',
291 h6 => 'HTML::Object::DOM::Element::Heading',
292 hr => 'HTML::Object::DOM::Element::HR',
293 html => 'HTML::Object::DOM::Element::HTML',
294 iframe => 'HTML::Object::DOM::Element::IFrame',
295 image => 'HTML::Object::DOM::Element::Image',
296 input => 'HTML::Object::DOM::Element::Input',
297 # Deprecated
298 isindex => 'HTML::Object::DOM::Element::Unknown',
299 # Deprecated
300 keygen => 'HTML::Object::DOM::Element::Unknown',
301 label => 'HTML::Object::DOM::Element::Label',
302 legend => 'HTML::Object::DOM::Element::Legend',
303 li => 'HTML::Object::DOM::Element::LI',
304 'link' => 'HTML::Object::DOM::Element::Link',
305 listing => 'HTML::Object::DOM::Element::Pre',
306 'map' => 'HTML::Object::DOM::Element::Map',
307 marquee => 'HTML::Object::DOM::Element::Marquee',
308 media => 'HTML::Object::DOM::Element::Media',
309 menu => 'HTML::Object::DOM::Element::Unknown',
310 meta => 'HTML::Object::DOM::Element::Meta',
311 meter => 'HTML::Object::DOM::Element::Meter',
312 mod => 'HTML::Object::DOM::Element::Mod',
313 # Deprecated
314 multicol => 'HTML::Object::DOM::Element::Unknown',
315 # Deprecated
316 nextid => 'HTML::Object::DOM::Element::Unknown',
317 nobr => 'HTML::Object::DOM::Element',
318 noembed => 'HTML::Object::DOM::Element',
319 noframes => 'HTML::Object::DOM::Element',
320 object => 'HTML::Object::DOM::Element::Object',
321 ol => 'HTML::Object::DOM::Element::OList',
322 optgroup => 'HTML::Object::DOM::Element::OptGroup',
323 option => 'HTML::Object::DOM::Element::Option',
324 output => 'HTML::Object::DOM::Element::Output',
325 p => 'HTML::Object::DOM::Element::Paragraph',
326 param => 'HTML::Object::DOM::Element::Param',
327 picture => 'HTML::Object::DOM::Element::Picture',
328 plaintext => 'HTML::Object::DOM::Element',
329 pre => 'HTML::Object::DOM::Element::Pre',
330 progress => 'HTML::Object::DOM::Element::Progress',
331 quote => 'HTML::Object::DOM::Element::Quote',
332 'q' => 'HTML::Object::DOM::Element::Quote',
333 rb => 'HTML::Object::DOM::Element',
334 rtc => 'HTML::Object::DOM::Element',
335 script => 'HTML::Object::DOM::Element::Script',
336 'select' => 'HTML::Object::DOM::Element::Select',
337 slot => 'HTML::Object::DOM::Element::Slot',
338 source => 'HTML::Object::DOM::Element::Source',
339 # Deprecated
340 spacert => 'HTML::Object::DOM::Element::Unknown',
341 span => 'HTML::Object::DOM::Element::Span',
342 strike => 'HTML::Object::DOM::Element',
343 style => 'HTML::Object::DOM::Element::Style',
344 table => 'HTML::Object::DOM::Element::Table',
345 td => 'HTML::Object::DOM::Element::TableCell',
346 th => 'HTML::Object::DOM::Element::TableCell',
347 'tr' => 'HTML::Object::DOM::Element::TableRow',
348 tbody => 'HTML::Object::DOM::Element::TableSection',
349 tfoot => 'HTML::Object::DOM::Element::TableSection',
350 thead => 'HTML::Object::DOM::Element::TableSection',
351 template => 'HTML::Object::DOM::Element::Template',
352 textarea => 'HTML::Object::DOM::Element::TextArea',
353 'time' => 'HTML::Object::DOM::Element::Time',
354 title => 'HTML::Object::DOM::Element::Title',
355 track => 'HTML::Object::DOM::Element::Track',
356 tt => 'HTML::Object::DOM::Element',
357 video => 'HTML::Object::DOM::Element::Video',
358 xmp => 'HTML::Object::DOM::Element::Pre',
359 };
360 }
361  
362 # *import = \&Exporter::import;
363  
364 sub init
365 {
366 90 ▶ my $self = shift( @_ );
Subroutine init: called CC=2 SCAR=7.0
Pod documented
367 90 $self->{onload} = undef;
368 90 $self->{onreadystatechange} = undef;
369 90 $self->{_init_strict_use_sub} = 1;
370 90 ▶ $self->SUPER::init( @_ ) || return( $self->pass_error );
Branch: 1 branch
BranchTrueFalseTotal
$self->SUPER::init(@_) or return $self->pass_error 0 90 90
371 90 my $win = $self->new_window( debug => $self->debug );
372 90 $self->window( $win );
373 90 return( $self );
374 }
375  
376 2297 ▶sub current_parent { return( shift->_set_get_object_without_init( 'current_parent', 'HTML::Object::DOM::Node', @_ ) ); }
Subroutine current_parent: called CC=1 SCAR=0.0
Pod documented
377  
378 152 ▶sub document { return( shift->_set_get_object( 'document', 'HTML::Object::DOM::Document', @_ ) ); }
Subroutine document: called CC=1 SCAR=0.0
Pod documented
379  
380 sub get_definition
381 {
382 395 ▶ my $self = shift( @_ );
Subroutine get_definition: called CC=4 SCAR=14.0
Pod documented
383 395 my $tag = shift( @_ );
384 395 ▶ return( $self->error( "No tag was provided to get its definition." ) ) if( !length( $tag ) );
Branch: 1 branch
BranchTrueFalseTotal
unless length $tag 0 395 395
385 # Just to be sure
386 395 $tag = lc( $tag );
387 395 ▶ my $def = $self->SUPER::get_definition( $tag, @_ ) || return( $self->pass_error );
Condition50%1/2
$self->SUPER::get_definition($tag, @_) || (return $self->pass_error)
l!l
3950
MC/DC0%0/1
$self->SUPER::get_definition($tag, @_) || (return $self->pass_error)
$self->SUPER::get_definition($tag, @_)
Truth table50%1/2
A
A= $self->SUPER::get_definition($tag, @_)
Aresult
11
00
388 395 ▶ $def->{class} = $TAG_TO_CLASS->{ $tag } if( CORE::exists( $TAG_TO_CLASS->{ $tag } ) );
Branch: 1 branch
BranchTrueFalseTotal
if exists $HTML::Object::DOM::TAG_TO_CLASS->{$tag} 383 12 395
389 395 return( $def );
390 }
391  
392 5 ▶sub get_dom { return( $GLOBAL_DOM ); }
Subroutine get_dom: called CC=1 SCAR=0.0
Pod documented
393  
394 sub new_closing
395 {
396 271 ▶ my $self = shift( @_ );
Subroutine new_closing: called CC=2 SCAR=7.1
Pod documented
397 271 ▶ my $e = HTML::Object::DOM::Closing->new( @_ ) ||
Condition50%1/2
'HTML::Object::DOM::Closing'->new(@_) || (return $self->pass_error('HTML::Object::DOM::Closing'->error))
l!l
2710
MC/DC0%0/1
'HTML::Object::DOM::Closing'->new(@_) || (return $self->pass_error('HTML::Object::DOM::Closing'->error))
'HTML::Object::DOM::Closing'->new(@_)
Truth table50%1/2
A
A= 'HTML::Object::DOM::Closing'->new(@_)
Aresult
11
00
398 return( $self->pass_error( HTML::Object::DOM::Closing->error ) );
399 271 return( $e );
400 }
401  
402 sub new_comment
403 {
404 6 ▶ my $self = shift( @_ );
Subroutine new_comment: called CC=2 SCAR=7.1
Pod documented
405 6 ▶ my $e = HTML::Object::DOM::Comment->new( @_ ) ||
Condition50%1/2
'HTML::Object::DOM::Comment'->new(@_) || (return $self->pass_error('HTML::Object::DOM::Comment'->error))
l!l
60
MC/DC0%0/1
'HTML::Object::DOM::Comment'->new(@_) || (return $self->pass_error('HTML::Object::DOM::Comment'->error))
'HTML::Object::DOM::Comment'->new(@_)
Truth table50%1/2
A
A= 'HTML::Object::DOM::Comment'->new(@_)
Aresult
11
00
406 return( $self->pass_error( HTML::Object::DOM::Comment->error ) );
407 6 return( $e );
408 }
409  
410 sub new_declaration
411 {
412 27 ▶ my $self = shift( @_ );
Subroutine new_declaration: called CC=2 SCAR=7.1
Pod documented
413 27 ▶ my $e = HTML::Object::DOM::Declaration->new( @_ ) ||
Condition50%1/2
'HTML::Object::DOM::Declaration'->new(@_) || (return $self->pass_error('HTML::Object::DOM::Declaration'->error))
l!l
270
MC/DC0%0/1
'HTML::Object::DOM::Declaration'->new(@_) || (return $self->pass_error('HTML::Object::DOM::Declaration'->error))
'HTML::Object::DOM::Declaration'->new(@_)
Truth table50%1/2
A
A= 'HTML::Object::DOM::Declaration'->new(@_)
Aresult
11
00
414 return( $self->pass_error( HTML::Object::DOM::Declaration->error ) );
415 27 return( $e );
416 }
417  
418 sub new_document
419 {
420 69 ▶ my $self = shift( @_ );
Subroutine new_document: called CC=2 SCAR=7.0
Pod documented
421 69 ▶ my $e = HTML::Object::DOM::Document->new( @_ ) ||
Condition50%1/2
'HTML::Object::DOM::Document'->new(@_) || (return $self->pass_error('HTML::Object::DOM::Document'->error))
l!l
690
MC/DC0%0/1
'HTML::Object::DOM::Document'->new(@_) || (return $self->pass_error('HTML::Object::DOM::Document'->error))
'HTML::Object::DOM::Document'->new(@_)
Truth table50%1/2
A
A= 'HTML::Object::DOM::Document'->new(@_)
Aresult
11
00
422 return( $self->pass_error( HTML::Object::DOM::Document->error ) );
423 69 my $win = $self->window;
424 69 $e->defaultView( $win );
425 69 return( $e );
426 }
427  
428 sub new_element
429 {
430 33 ▶ my $self = shift( @_ );
Subroutine new_element: called CC=2 SCAR=7.1
Pod documented
431 33 ▶ my $e = HTML::Object::DOM::Element->new( @_ ) ||
Condition50%1/2
'HTML::Object::DOM::Element'->new(@_) || (return $self->pass_error('HTML::Object::DOM::Element'->error))
l!l
330
MC/DC0%0/1
'HTML::Object::DOM::Element'->new(@_) || (return $self->pass_error('HTML::Object::DOM::Element'->error))
'HTML::Object::DOM::Element'->new(@_)
Truth table50%1/2
A
A= 'HTML::Object::DOM::Element'->new(@_)
Aresult
11
00
432 return( $self->pass_error( HTML::Object::DOM::Element->error ) );
433 33 return( $e );
434 }
435  
436 sub new_space
437 {
438 440 ▶ my $self = shift( @_ );
Subroutine new_space: called CC=2 SCAR=7.1
Pod documented
439 440 ▶ my $e = HTML::Object::DOM::Space->new( @_ ) ||
Condition50%1/2
'HTML::Object::DOM::Space'->new(@_) || (return $self->pass_error('HTML::Object::DOM::Space'->error))
l!l
4400
MC/DC0%0/1
'HTML::Object::DOM::Space'->new(@_) || (return $self->pass_error('HTML::Object::DOM::Space'->error))
'HTML::Object::DOM::Space'->new(@_)
Truth table50%1/2
A
A= 'HTML::Object::DOM::Space'->new(@_)
Aresult
11
00
440 return( $self->pass_error( HTML::Object::DOM::Space->error ) );
441 440 return( $e );
442 }
443  
444 sub new_text
445 {
446 127 ▶ my $self = shift( @_ );
Subroutine new_text: called CC=2 SCAR=7.1
Pod documented
447 127 ▶ my $e = HTML::Object::DOM::Text->new( @_ ) ||
Condition50%1/2
'HTML::Object::DOM::Text'->new(@_) || (return $self->pass_error('HTML::Object::DOM::Text'->error))
l!l
1270
MC/DC0%0/1
'HTML::Object::DOM::Text'->new(@_) || (return $self->pass_error('HTML::Object::DOM::Text'->error))
'HTML::Object::DOM::Text'->new(@_)
Truth table50%1/2
A
A= 'HTML::Object::DOM::Text'->new(@_)
Aresult
11
00
448 return( $self->pass_error( HTML::Object::DOM::Text->error ) );
449 127 return( $e );
450 }
451  
452 sub new_window
453 {
454 90 ▶ my $self = shift( @_ );
Subroutine new_window: called CC=3 SCAR=11.0
Pod documented
455 90 ▶ my $e = HTML::Object::DOM::Window->new( @_ ) ||
Condition50%1/2
'HTML::Object::DOM::Window'->new(@_) || (return $self->pass_error('HTML::Object::DOM::Window'->error))
l!l
900
MC/DC0%0/1
'HTML::Object::DOM::Window'->new(@_) || (return $self->pass_error('HTML::Object::DOM::Window'->error))
'HTML::Object::DOM::Window'->new(@_)
Truth table50%1/2
A
A= 'HTML::Object::DOM::Window'->new(@_)
Aresult
11
00
456 return( $self->pass_error( HTML::Object::DOM::Window->error ) );
457 90 $e->screen( $SCREEN );
458 90 ▶ $WINDOW = $e unless( ref( $WINDOW ) );
Branch: 1 branch
BranchTrueFalseTotal
unless ref $HTML::Object::DOM::WINDOW 29 61 90
459 90 return( $e );
460 }
461  
462 66 ▶sub onload : lvalue { return( shift->_set_get_code( 'onload', @_ ) ); }
Subroutine onload: called CC=1 SCAR=0.0
Pod documented
463  
464 65 ▶sub onreadystatechange : lvalue { return( shift->_set_get_code( 'onreadystatechange', @_ ) ); }
Subroutine onreadystatechange: called CC=1 SCAR=0.0
Pod documented
465  
466 0 ▶sub parseFromString { return( shift->parse_data( @_ ) ); }
Subroutine parseFromString: not called CC=1 SCAR=6.9
Pod documented
467  
468 0 ▶sub screen { return( $SCREEN ); }
Subroutine screen: not called CC=1 SCAR=6.9
Pod documented
469  
470 sub set_dom
471 {
472 12 ▶ my( $this, $html ) = @_;
Subroutine set_dom: called CC=5 SCAR=16.5
Pod documented
473 12 ▶ if( defined( $html ) )
Branch: 1 branch
BranchTrueFalseTotal
if (defined $html) 12 0 12
474 {
475 12 ▶ if( Scalar::Util::blessed( $html ) && $html->isa( 'HTML::Object::DOM::Document' ) )
Branch: 2 branches
BranchTrueFalseTotal
if (builtin::blessed($html) and $html->isa('HTML::Object::DOM::Document')) { } 6 6 12
elsif (length $html) { } 6 0 6
Condition66%2/3
builtin::blessed($html) and $html->isa("HTML::Object::DOM::Document")
!ll&&!rl&&r
606
MC/DC50%1/2
builtin::blessed($html) and $html->isa("HTML::Object::DOM::Document")
builtin::blessed($html) $html->isa("HTML::Object::DOM::Document")
Truth table66%2/3
A and B
A= builtin::blessed($html)B= $html->isa("HTML::Object::DOM::Document")
ABresult
0X0
100
111
476 {
477 6 $GLOBAL_DOM = $html;
478 }
479 elsif( CORE::length( $html ) )
480 {
481 6 $GLOBAL_DOM = $this->new->parse( $html );
482 }
483 }
484 12 return( $this );
485 }
486  
487 sub window
488 {
489 159 ▶ if( !scalar( @_ ) )
Subroutine window: called CC=5 SCAR=21.6
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
unless (scalar @_) 0 159 159
490 {
491 0 return( $WINDOW );
492 }
493 159 my $self = shift( @_ );
494 159 ▶ if( Scalar::Util::blessed( $self ) )
Branch: 1 branch
BranchTrueFalseTotal
if (builtin::blessed($self)) { } 159 0 159
495 {
496 159 ▶ if( $self->isa( 'HTML::Object::DOM' ) )
Branch: 1 branch
BranchTrueFalseTotal
if ($self->isa('HTML::Object::DOM')) { } 159 0 159
497 {
498 159 return( $self->_set_get_object( 'window', 'HTML::Object::DOM::Window', @_ ) );
499 }
500 else
501 {
502 0 ▶ die( "You cannot call window as a class function and passing it an object other than a HTML::Object::DOM::Window object.\n" ) unless( $self->isa( 'HTML::Object::DOM::Window' ) );
Branch: 1 branch
BranchTrueFalseTotal
unless $self->isa("HTML::Object::DOM::Window") 0 0 0
503 0 $WINDOW = $self;
504 }
505 }
506 else
507 {
508 0 die( "Unknown value (", overload::StrVal( $self ), ") provided to window() called as a HTML::Object::DOM class function\n" );
509 }
510 }
511  
512 32 1;
513 # NOTE: POD
514 __END__
515  
516 =encoding utf-8
517  
518 =head1 NAME
519  
520 HTML::Object::DOM - HTML Object DOM Class
521  
522 =head1 SYNOPSIS
523  
524 use HTML::Object::DOM;
525 my $this = HTML::Object::DOM->new || die( HTML::Object::DOM->error, "\n" );
526  
527 =head1 VERSION
528  
529 v0.5.0
530  
531 =head1 DESCRIPTION
532  
533 This module implement DOM-like interface to HTML objects and inherits from L<HTML::Object>, so you can call this module instead, to parse HTML data and it the resulting tree of objects will have DOM capabilities.
534  
535 DOM stands for Document Object Model.
536  
537 There are 2 divergences from the standard:
538  
539 =over 4
540  
541 =item 1. nodeName
542  
543 L<nodeName|HTML::Object::DOM::Node/nodeName> returns the tag name in lower case instead of the upper case
544  
545 =item 2. Space and text
546  
547 This interface makes the difference between L<text|HTML::Object::DOM::Text> and L<space-only text|HTML::Object::DOM::Space> whereas the DOM standard specification treats both as a text node.
548  
549 This leads to a new non-standard constant L<nodeType|HTML::Object::DOM::Node/nodeType> for space having a value C<SPACE_NODE> (13) and the non-standard constant C<SHOW_SPACE> in L<HTML::Object::DOM::NodeFilter>
550  
551 =back
552  
553 =head1 INHERITANCE
554  
555 +--------------+ +-------------------+
556 | HTML::Object | --> | HTML::Object::DOM |
557 +--------------+ +-------------------+
558  
559 =head1 CONSTRUCTOR
560  
561 =head2 new
562  
563 Provided with an hash or hash reference of options and this returns a new L<HTML::Object::DOM> object. Options available are the same as the methods available.
564  
565 =head1 METHODS
566  
567 =head2 current_parent
568  
569 This represent the parent for the current element being processed by the parser.
570  
571 =head2 document
572  
573 Set or get the L<element object|HTML::Object::DOM::Document> for the document.
574  
575 =head2 get_definition
576  
577 Provided with a tag name and this will return its corresponding L<hash reference|HTML::Object/dictionary> or C<undef> if there is no such tag or an L<error|Module::Generic/error> occurred somehow.
578  
579 =head2 get_dom
580  
581 Get the value for the global variable C<$GLOBAL_DOM>, which should be a L<HTML::Object::DOM::Document> object.
582  
583 =head2 new_closing
584  
585 Instantiates a new L<closing element|HTML::Object::DOM::Closing>, passing it any arguments received, and returns the new object.
586  
587 =head2 new_comment
588  
589 Instantiates a new L<comment element|HTML::Object::DOM::Comment>, passing it any arguments received, and returns the new object.
590  
591 =head2 new_declaration
592  
593 Instantiates a new L<declaration element|HTML::Object::DOM::Declaration>, passing it any arguments received, and returns the new object.
594  
595 =head2 new_document
596  
597 Instantiates a new L<document element|HTML::Object::DOM::Document>, passing it any arguments received, and returns the new object.
598  
599 The new document object has its property C<defaultView> set to a new L<window object|HTML::Object::DOM::Window>
600  
601 =head2 new_element
602  
603 Instantiates a new L<element|HTML::Object::DOM::Element>, passing it any arguments received, and returns the new object.
604  
605 =head2 new_space
606  
607 Instantiates a new L<space element|HTML::Object::DOM::Space>, passing it any arguments received, and returns the new object.
608  
609 =head2 new_text
610  
611 Instantiates a new L<text element|HTML::Object::DOM::Text>, passing it any arguments received, and returns the new object.
612  
613 =head2 new_window
614  
615 Instantiates a new L<window object|HTML::Object::DOM::Window>, passing it any arguments received, and returns the new object.
616  
617 =head2 onload
618  
619 Set or get the code reference to be executed when the parsing of the html data has been completed.
620  
621 The value of this code reference is provided to the new document when it is instantiated.
622  
623 Upon execution, C<$_> is set to the L<HTML document object|HTML::Object::DOM::Document>, and a new event is passed of type C<readstate> and with the C<detail> property having the following data available:
624  
625 =over 4
626  
627 =item document
628  
629 The L<document object|HTML::Object::DOM::Document>
630  
631 =item state
632  
633 The state of the document parsing.
634  
635 =back
636  
637 The event C<target> property is also set to the L<document object|HTML::Object::DOM::Document>.
638  
639 =head2 onreadystatechange
640  
641 Set or get the code reference to be executed whenever there is a change of state to the document. 3 states are available: C<loading>, C<interactive> and C<complete>
642  
643 The value of this code reference is provided to the new document when it is instantiated.
644  
645 Upon execution, C<$_> is set to the L<HTML document object|HTML::Object::DOM::Document>, and a new event is passed of type C<readstate> and with the C<detail> property having the following data available:
646  
647 =over 4
648  
649 =item document
650  
651 The L<document object|HTML::Object::DOM::Document>
652  
653 =item state
654  
655 The state of the document parsing.
656  
657 =back
658  
659 The event C<target> property is also set to the L<document object|HTML::Object::DOM::Document>.
660  
661 =head2 parseFromString
662  
663 Provided with some HTML data, and this will parse it and return a new L<document object|HTML::Object::DOM::Document> or C<undef> if an L<error|Module::Generic/error> occurred.
664  
665 =head2 screen
666  
667 Returns the L<HTML::Object::DOM::Screen> object.
668  
669 =head2 set_dom
670  
671 Set the global variable C<$GLOBAL_DOM> which must be a L<HTML::Object::DOM::Document>
672  
673 =head2 window
674  
675 Set or get the L<window object|HTML::Object::DOM::Window> for this new parser and the L<document|HTML::Object::DOM::Document> it creates.
676  
677 =head1 CONSTANTS
678  
679 The following constants can be exported and used, such as:
680  
681 use HTML::Object::DOM qw( :event );
682 # or directly
683 use HTML::Object::Event qw( :all );
684  
685 =over 4
686  
687 =item NONE (0)
688  
689 The event is not being processed at this time.
690  
691 =item CAPTURING_PHASE (1)
692  
693 The event is being propagated through the target's ancestor objects. This process starts with the L<Document|HTML::Object::Document>, then the L<HTML html element|HTML::Object::Element>, and so on through the elements until the target's parent is reached. Event listeners registered for capture mode when L<HTML::Object::EventTarget/addEventListener> was called are triggered during this phase.
694  
695 =item AT_TARGET (2)
696  
697 The event has arrived at the event's target. Event listeners registered for this phase are called at this time. If L</bubbles> is false, processing the event is finished after this phase is complete.
698  
699 =item BUBBLING_PHASE (3)
700  
701 The event is propagating back up through the target's ancestors in reverse order, starting with the parent, and eventually reaching the containing L<document|HTML::Object::Document>. This is known as bubbling, and occurs only if L</bubbles> is true. Event listeners registered for this phase are triggered during this process.
702  
703 =item CANCEL_PROPAGATION (1)
704  
705 State of the propagation being cancelled.
706  
707 $event->stopPropagation();
708 $event->cancelled == CANCEL_PROPAGATION;
709  
710 =item CANCEL_IMMEDIATE_PROPAGATION (2)
711  
712 State of immediate propagation being cancelled.
713  
714 $event->stopImmediatePropagation();
715 $event->cancelled == CANCEL_IMMEDIATE_PROPAGATION;
716  
717 =back
718  
719 For L<HTML::Object::DOM::Element::Media>:
720  
721 use HTML::Object::DOM qw( :media );
722 # or directly from HTML::Object::DOM::Element::Media
723 use HTML::Object::DOM::Element::Media qw( :all );
724  
725 =over 4
726  
727 =item NETWORK_EMPTY (0)
728  
729 There is no data yet. Also, readyState is HAVE_NOTHING.
730  
731 =item NETWORK_IDLE (1)
732  
733 L<Media element|HTML::Object::DOM::Element::Media> is active and has selected a resource, but is not using the network.
734  
735 =item NETWORK_LOADING (2)
736  
737 The browser is downloading L<HTML::Object::DOM::Element::Media> data.
738  
739 =item NETWORK_NO_SOURCE (3)
740  
741 No L<HTML::Object::DOM::Element::Media> src found.
742  
743 =back
744  
745 For L<HTML::Object::DOM::Element::Track>:
746  
747 use HTML::Object::DOM qw( :track );
748 # or directly from HTML::Object::DOM::Element::Track
749 use HTML::Object::DOM::Element::Track qw( :all );
750  
751 =over 4
752  
753 =item NONE (0)
754  
755 Indicates that the text track's cues have not been obtained.
756  
757 Also used in L<HTML::Object::Event> to indicate the event is not being processed at this time.
758  
759 =item LOADING (1)
760  
761 Indicates that the text track is loading and there have been no fatal errors encountered so far. Further cues might still be added to the track by the parser.
762  
763 =item LOADED (2)
764  
765 Indicates that the text track has been loaded with no fatal errors.
766  
767 =item ERROR (3)
768  
769 Indicates that the text track was enabled, but when the user agent attempted to obtain it, this failed in some way. Some or all of the cues are likely missing and will not be obtained.
770  
771 =back
772  
773 For L<HTML::Object::DOM::Node>:
774  
775 use HTML::Object::DOM qw( :node );
776 # or directly from HTML::Object::DOM::Node
777 # Automatically exported
778 use HTML::Object::DOM::Node;
779  
780 =over 4
781  
782 =item * DOCUMENT_POSITION_IDENTICAL (0 or in bits: 000000)
783  
784 Elements are identical.
785  
786 =item * DOCUMENT_POSITION_DISCONNECTED (1 or in bits: 000001)
787  
788 No relationship, both nodes are in different documents or different trees in the same document.
789  
790 =item * DOCUMENT_POSITION_PRECEDING (2 or in bits: 000010)
791  
792 The specified node precedes the current node.
793  
794 =item * DOCUMENT_POSITION_FOLLOWING (4 or in bits: 000100)
795  
796 The specified node follows the current node.
797  
798 =item * DOCUMENT_POSITION_CONTAINS (8 or in bits: 001000)
799  
800 The otherNode is an ancestor of / contains the current node.
801  
802 =item * DOCUMENT_POSITION_CONTAINED_BY (16 or in bits: 010000)
803  
804 The otherNode is a descendant of / contained by the node.
805  
806 =item * DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC (32 or in bits: 100000)
807  
808 The specified node and the current node have no common container node or the two nodes are different attributes of the same node.
809  
810 =back
811  
812 And also the following constants:
813  
814 =over 4
815  
816 =item ELEMENT_NODE (1)
817  
818 =item ATTRIBUTE_NODE (2)
819  
820 =item TEXT_NODE (3)
821  
822 =item CDATA_SECTION_NODE (4)
823  
824 =item ENTITY_REFERENCE_NODE (5)
825  
826 =item ENTITY_NODE (6)
827  
828 =item PROCESSING_INSTRUCTION_NODE (7)
829  
830 =item COMMENT_NODE (8)
831  
832 =item DOCUMENT_NODE (9)
833  
834 =item DOCUMENT_TYPE_NODE (10)
835  
836 =item DOCUMENT_FRAGMENT_NODE (11)
837  
838 =item NOTATION_NODE (12)
839  
840 =item SPACE_NODE (13)
841  
842 =back
843  
844 For L<HTML::Object::DOM::NodeFilter>:
845  
846 use HTML::Object::DOM qw( :filter );
847 # or directly from HTML::Object::DOM::NodeFilter
848 # Exportable constants
849 use HTML::Object::DOM::NodeFilter qw( :all );
850  
851 =over 4
852  
853 =item SHOW_ALL (4294967295)
854  
855 Shows all nodes.
856  
857 =item SHOW_ELEMENT (1)
858  
859 Shows Element nodes.
860  
861 =item SHOW_ATTRIBUTE (2)
862  
863 Shows attribute L<Attribute nodes|HTML::Object::DOM::Attribute>.
864  
865 =item SHOW_TEXT (4)
866  
867 Shows Text nodes.
868  
869 =item SHOW_CDATA_SECTION (8)
870  
871 Will always returns nothing, because there is no support for xml documents.
872  
873 =item SHOW_ENTITY_REFERENCE (16)
874  
875 Legacy, no more used.
876  
877 =item SHOW_ENTITY (32)
878  
879 Legacy, no more used.
880  
881 =item SHOW_PROCESSING_INSTRUCTION (64)
882  
883 Shows ProcessingInstruction nodes.
884  
885 =item SHOW_COMMENT (128)
886  
887 Shows Comment nodes.
888  
889 =item SHOW_DOCUMENT (256)
890  
891 Shows Document nodes
892  
893 =item SHOW_DOCUMENT_TYPE (512)
894  
895 Shows C<DocumentType> nodes
896  
897 =item SHOW_DOCUMENT_FRAGMENT (1024)
898  
899 Shows L<HTML::Object::DOM::DocumentFragment> nodes.
900  
901 =item SHOW_NOTATION (2048)
902  
903 Legacy, no more used.
904  
905 =item SHOW_SPACE (4096)
906  
907 Show Space nodes. This is a non-standard extension under this perl framework.
908  
909 =back
910  
911 For L<HTML::Object::DOM::XPathResult>:
912  
913 use HTML::Object::DOM qw( :xpath );
914 # or directly from HTML::Object::DOM::Element::Track
915 # Automatically exported
916 use HTML::Object::DOM::XPathResult;
917  
918 =over 4
919  
920 =item ANY_TYPE (0)
921  
922 A result set containing whatever type naturally results from evaluation of the expression. Note that if the result is a node-set then C<UNORDERED_NODE_ITERATOR_TYPE> is always the resulting type.
923  
924 =item NUMBER_TYPE (1)
925  
926 A result containing a single number. This is useful for example, in an XPath expression using the count() function.
927  
928 =item STRING_TYPE (2)
929  
930 A result containing a single string.
931  
932 =item BOOLEAN_TYPE (3)
933  
934 A result containing a single boolean value. This is useful for example, in an XPath expression using the not() function.
935  
936 =item UNORDERED_NODE_ITERATOR_TYPE (4)
937  
938 A result node-set containing all the nodes matching the expression. The nodes may not necessarily be in the same order that they appear in the document.
939  
940 =item ORDERED_NODE_ITERATOR_TYPE (5)
941  
942 A result node-set containing all the nodes matching the expression. The nodes in the result set are in the same order that they appear in the document.
943  
944 =item UNORDERED_NODE_SNAPSHOT_TYPE (6)
945  
946 A result node-set containing snapshots of all the nodes matching the expression. The nodes may not necessarily be in the same order that they appear in the document.
947  
948 =item ORDERED_NODE_SNAPSHOT_TYPE (7)
949  
950 A result node-set containing snapshots of all the nodes matching the expression. The nodes in the result set are in the same order that they appear in the document.
951  
952 =item ANY_UNORDERED_NODE_TYPE (8)
953  
954 A result node-set containing any single node that matches the expression. The node is not necessarily the first node in the document that matches the expression.
955  
956 =item FIRST_ORDERED_NODE_TYPE (9)
957  
958 A result node-set containing the first node in the document that matches the expression.
959  
960 =back
961  
962 =head1 AUTHOR
963  
964 Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
965  
966 =head1 SEE ALSO
967  
968 L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model>
969  
970 L<Mozilla documentation on HTML DOM API|https://developer.mozilla.org/en-US/docs/Web/API/HTML_DOM_API>
971  
972 L<W3C standard|https://html.spec.whatwg.org/multipage/dom.html>, L<HTML elements specifications|https://html.spec.whatwg.org/>
973  
974 =head1 COPYRIGHT & LICENSE
975  
976 Copyright(c) 2021 DEGUEST Pte. Ltd.
977  
978 All rights reserved
979  
980 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
981  
982 =cut
« blib/lib/HTML/Object/DOM/Element/OList.pm ↑ Summary lib/HTML/Object/ElementDataMap.pm »