HTML-HTML5-DOM
view release on metacpan or search on metacpan
$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
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
=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 1.180 second using v1.01-cache-2.11-cpan-49f99fa48dc )