78 |
my $doc = Whatpm::HTML->parse_string |
my $doc = Whatpm::HTML->parse_string |
79 |
($s => Whatpm::NanoDOM::Document->new, $onerror); |
($s => Whatpm::NanoDOM::Document->new, $onerror); |
80 |
|
|
|
=item I<$s> = Whatpm::HTML->get_inner_html (I<$node>[, I<$onerror>]); |
|
|
|
|
|
Return the HTML serialization of a DOM node I<$node>. |
|
|
|
|
|
The first argument, I<$node>, MUST be a DOM C<Document>, |
|
|
C<Element>, or C<DocumentFragment> node. |
|
|
|
|
|
The second argument, I<$onerror>, MUST be a reference to the |
|
|
error handling code. This code will be invoked if a descendant |
|
|
of I<$node> is neither of C<Element>, C<Text>, C<CDATASection>, |
|
|
C<Comment>, C<DocumentType>, nor C<EntityReference>, so |
|
|
that an C<INVALID_STATE_ERR> exception MUST be thrown. |
|
|
The code will be invoked with an argument, which is the node |
|
|
whose type is invalid. |
|
|
The argument I<$onerror> is optional; if missing, any erroneous |
|
|
node is simply ignored. |
|
|
|
|
|
The method returns a reference to the C<inner_html> attribute |
|
|
value, i.e. the HTML serialization of the I<$node>. |
|
|
|
|
81 |
=back |
=back |
82 |
|
|
83 |
=head1 LOW-LEVEL INTERFACE |
=head1 LOW-LEVEL INTERFACE |
126 |
|
|
127 |
HTML5 <http://whatwg.org/html5>. |
HTML5 <http://whatwg.org/html5>. |
128 |
|
|
129 |
|
L<Whatpm::HTML::Serializer>. |
130 |
|
|
131 |
L<Whatpm::NanoDOM>. |
L<Whatpm::NanoDOM>. |
132 |
|
|
133 |
L<Whatpm::ContentChecker::HTML>. |
L<Whatpm::ContentChecker::HTML>. |