Name
Range.setEndAfter( ) — end a range after a specified node
Availability
DOM Level 2 Range
Synopsis
void setEndAfter(Node refNode
)
throws RangeException,
DOMException;
Arguments
-
refNode
The node after which the end point of the range is to be set.
Throws
A RangeException with a code
of
INVALID_NODE_TYPE_ERR
if
refNode
is a Document, DocumentFragment,
Attr, Entity, or Notation node, or if the root container of
refNode
is not a Document,
DocumentFragment, or Attr node.
A DOMException with a code
of
WRONG_DOCUMENT_ERR
if
refNode
is part of a different document
than the one through which this range was created.
Description
This method sets the end point of this range to fall immediately
after the specified refNode
.
Get JavaScript: The Definitive Guide, Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.