HTML-HTML5-DOM
view release on metacpan or search on metacpan
616263646566676869707172737475767778798081
$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
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
272829303132333435363738394041424344454647sub
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
328532863287328832893290329132923293329432953296329732983299330033013302330333043305=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 )