HTML-HTML5-DOM

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
    $elem->isa( 'h1' );                 # element tag name
    $elem->isa( -HTMLHeadingElement );  # DOM interface name
 
HTML::HTML5::DOM class methods
  While most of the interesting stuff is in HTML::HTML5::DOM::HTMLElement
  and other classes like that, the HTML::HTML5::DOM package itself provides
  a handful of methods of its own.
 
  *   `XHTML_NS`
 
      Constant. The XHTML namespace URI as a string.
 
  *   `getDOMImplementation`
 
      Gets a singleton object blessed into the HTML::HTML5::DOM class.
 
  *   `hasFeature`
 
      Given a feature and version, returns true if the feature is supported.
 
        my $impl = HTML::HTML5::DOM->getDOMImplementation;

lib/HTML/HTML5/DOM.pm  view on Meta::CPAN

27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
sub getDOMImplementation
{
        return $me;
}
 
our @FEATURES = (
        HTML::HTML5::DOMutil::Feature->new(Core       => '3.0'),
        HTML::HTML5::DOMutil::Feature->new(XML        => '3.0'),
        HTML::HTML5::DOMutil::Feature->new(XMLVersion => '1.1'),
        HTML::HTML5::DOMutil::Feature->new(HTML       => '2.0'),
        HTML::HTML5::DOMutil::Feature->new(XHTML      => '2.0'),
);
 
sub getFeature
{
        my $self = shift;
        my @has  = $self->hasFeature(@_);
        @has ? $has[0] : undef;
}
 
sub hasFeature

lib/HTML/HTML5/DOM.pm  view on Meta::CPAN

3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
=head2 HTML::HTML5::DOM class methods
 
While most of the interesting stuff is in L<HTML::HTML5::DOM::HTMLElement>
and other classes like that, the HTML::HTML5::DOM package itself provides a
handful of methods of its own.
 
=over
 
=item * C<< XHTML_NS >>
 
Constant. The XHTML namespace URI as a string.
 
=item * C<< getDOMImplementation >>
 
Gets a singleton object blessed into the HTML::HTML5::DOM class.
 
=item * C<< hasFeature >>
 
Given a feature and version, returns true if the feature is supported.
 
  my $impl = HTML::HTML5::DOM->getDOMImplementation;



( run in 0.962 second using v1.01-cache-2.11-cpan-95122f20152 )