| 17 |
<li><a href="#synopsis">SYNOPSIS</a></li> |
<li><a href="#synopsis">SYNOPSIS</a></li> |
| 18 |
<li><a href="#description">DESCRIPTION</a></li> |
<li><a href="#description">DESCRIPTION</a></li> |
| 19 |
<li><a href="#methods">METHODS</a></li> |
<li><a href="#methods">METHODS</a></li> |
| 20 |
|
<li><a href="#lowlevel_interface">LOW-LEVEL INTERFACE</a></li> |
| 21 |
|
<ul> |
| 22 |
|
|
| 23 |
|
<li><a href="#application_cache_selection_algorithm_hook">Application Cache Selection Algorithm Hook</a></li> |
| 24 |
|
</ul> |
| 25 |
|
|
| 26 |
<li><a href="#to_do">TO DO</a></li> |
<li><a href="#to_do">TO DO</a></li> |
| 27 |
<li><a href="#see_also">SEE ALSO</a></li> |
<li><a href="#see_also">SEE ALSO</a></li> |
| 28 |
<li><a href="#author">AUTHOR</a></li> |
<li><a href="#author">AUTHOR</a></li> |
| 108 |
</dd> |
</dd> |
| 109 |
<dd> |
<dd> |
| 110 |
<p>Note that the <code>Whatpm::NanoDOM</code> module provides a non-conforming |
<p>Note that the <code>Whatpm::NanoDOM</code> module provides a non-conforming |
| 111 |
implementation of DOM that only implements the subset that |
implementation of DOM that only implements a subset that |
| 112 |
is necessary for the purpose of <code>Whatpm::HTML</code>'s parsing and |
is necessary for the purpose of <code>Whatpm::HTML</code>'s parsing and |
| 113 |
serializing. |
serializing. |
| 114 |
With this module, creating a new HTML <code>Document</code> object |
With this module, creating a new HTML <code>Document</code> object |
| 129 |
</dd> |
</dd> |
| 130 |
<dd> |
<dd> |
| 131 |
<p>The first argument, <em>$node</em>, MUST be a DOM <code>Document</code>, |
<p>The first argument, <em>$node</em>, MUST be a DOM <code>Document</code>, |
| 132 |
<code>Node</code>, or <code>DocumentFragment</code> object.</p> |
<code>Element</code>, or <code>DocumentFragment</code> node.</p> |
| 133 |
</dd> |
</dd> |
| 134 |
<dd> |
<dd> |
| 135 |
<p>The second argument, <em>$onerror</em>, MUST be a reference to the |
<p>The second argument, <em>$onerror</em>, MUST be a reference to the |
| 136 |
error handling code. This code will be invoked if a descendant |
error handling code. This code will be invoked if a descendant |
| 137 |
of <em>$node</em> is not of <code>Element</code>, <code>Text</code>, <code>CDATASection</code>, |
of <em>$node</em> is neither of <code>Element</code>, <code>Text</code>, <code>CDATASection</code>, |
| 138 |
<code>Comment</code>, <code>DocumentType</code>, or <code>EntityReference</code> so |
<code>Comment</code>, <code>DocumentType</code>, nor <code>EntityReference</code>, so |
| 139 |
that <code>INVALID_STATE_ERR</code> MUST be thrown. |
that an <code>INVALID_STATE_ERR</code> exception MUST be thrown. |
| 140 |
The code will be invoked with an argument, which is the node |
The code will be invoked with an argument, which is the node |
| 141 |
whose type is invalid. |
whose type is invalid. |
| 142 |
This argument is optional; if missing, any such |
The argument <em>$onerror</em> is optional; if missing, any erroneous |
| 143 |
node is simply ignored.</p> |
node is simply ignored.</p> |
| 144 |
</dd> |
</dd> |
| 145 |
<dd> |
<dd> |
| 150 |
<p> |
<p> |
| 151 |
</p> |
</p> |
| 152 |
<hr /> |
<hr /> |
| 153 |
|
<h1><a name="lowlevel_interface">LOW-LEVEL INTERFACE</a></h1> |
| 154 |
|
<p>@@ TBW</p> |
| 155 |
|
<p> |
| 156 |
|
</p> |
| 157 |
|
<h2><a name="application_cache_selection_algorithm_hook">Application Cache Selection Algorithm Hook</a></h2> |
| 158 |
|
<p>Once a parser <em>$p</em> is instantiated by method <code>new</code>, |
| 159 |
|
a <code>CODE</code> reference can be set to <code>$p-</code>{application_cache_selection}>. |
| 160 |
|
That <code>CODE</code> will be called back when the application cache selection |
| 161 |
|
algorithm MUST be run per HTML5. By default, |
| 162 |
|
<code>$p-</code>{application_cache_selection}> is set to an empty subroutine.</p> |
| 163 |
|
<p> |
| 164 |
|
</p> |
| 165 |
|
<hr /> |
| 166 |
<h1><a name="to_do">TO DO</a></h1> |
<h1><a name="to_do">TO DO</a></h1> |
| 167 |
<p>Tokenizer should emit a sequence of character tokens as one token |
<p>Tokenizer should emit a sequence of character tokens as one token |
| 168 |
to improve performance.</p> |
to improve performance.</p> |
| 169 |
<p>A method that accepts a byte stream as an input.</p> |
<p>A method that accepts a byte stream as an input.</p> |
| 170 |
<p>Charset detection algorithm.</p> |
<p>Charset detection algorithm.</p> |
| 171 |
<p>Setting inner_html.</p> |
<p>Documentation for the setter of inner_html.</p> |
| 172 |
<p>And there are many ``TODO''s and ``ISSUE''s in the source code.</p> |
<p>And there are many ``TODO''s and ``ISSUE''s in the source code.</p> |
| 173 |
<p> |
<p> |
| 174 |
</p> |
</p> |