<html>
<link rel="stylesheet" href="josh.css">
<body bgcolor="#FFFFFF">

		<div id="Description">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">RangeException</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">n/a</span>  IE <span class="emphasis">n/a</span> DOM <span class="emphasis">2</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements">&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>Some operations on W3C DOM <span class="literal">Range</span> objects can
trigger errors, or, in the vernacular of JavaScript 1.5, throw
exceptions if something goes wrong. The W3C DOM defines an object
that conveys a code number corresponding to a well-defined, if
somewhat limited, list of exceptions specifically related to
<span class="literal">Range</span> objects. For example, if you attempt to set
range boundaries to encompass non-content-related nodes (such as an
<span class="literal">Attr</span> node), the <span class="literal">selectNode( )</span>
method with such a node as a parameter throws an exception whose code
number is 2. This number corresponds to the exception that signals an
attempt to perform an illegal or logically impossible action on a
text range.
</p>
							</td>
						</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
						<tr>
							<td colspan="2"><p>			When eventually implemented in browsers, the scripting mechanism to
work with range exceptions should be the same as described for the
<span class="literal">DOMException</span> object. <span class="literal">Range</span>
object property and method access can also throw
<span class="literal">DOMException</span>s.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="objectmodelreference"><span class="title">Object Model Reference</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre><span class="replaceable">errorObjectReference</span></pre>
						</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="objectspecificproperties"><span class="title">Object-Specific Properties</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			<span class="literal">code</span></p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="objectspecificmethods"><span class="title">Object-Specific Methods</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			None. </p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="objectspecificeventhandlerproperties"><span class="title">Object-Specific Event Handler Properties</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			None. </p>
					</td>
				</tr>
			</table>
		</div><div id="code">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">code</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">n/a</span> IE <span class="emphasis">n/a</span> DOM <span class="emphasis">1</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements">Read-only&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>Provides the integer corresponding to one of the defined
<span class="literal">Range</span> object error types, as shown in the
following table.
</p>
							</td>
						</tr>
						<tr>
							<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
						</tr>
						<tr>
							<td>
								<table border="1"><tbody><tr><th>Code</th><th>Constant</th><th>Most Likely Cause</th></tr>
										<tr><td><span class="literal">1</span></td><td><span class="literal">BAD_BOUNDARYPOINTS_ERR</span></td><td>The <span class="literal">surroundContents( )</span> method was applied to a
range with a nonapplicable end point
</td>
										</tr>
										<tr><td><span class="literal">2</span></td><td><span class="literal">INVALID_NODE_TYPE_ERR</span></td><td>The method tried to work in a nonapplicable type of node</td>
										</tr>
									</tbody></table>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="value"><span class="title">Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			Integer</p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap colspan="2" class="default"><span class="title">Default</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			Determined by error.</p>
					</td>
				</tr>
			</table>
		</div>

</body>
</html>