Javascript [Electronic resources] : The Definitive Guide (4th Edition)

David Flanagan

نسخه متنی -صفحه : 844/ 722
نمايش فراداده

Availability

DOM Level 2 Traversal

Synopsis

Node previousNode( ) throws DOMException;

Returns

The previous node in the sequence of nodes represented by this NodeIterator, or null if there is no previous node.

Throws

If this method is called after a call to detach( ), it throws a DOMException with a code of INVALID_STATE_ERR.

Description

This method iterates backward through the sequence of nodes represented by this NodeIterator. It returns the node before the one that was most recently returned by previousNode( ) or nextNode( ). If there is no such node in the sequence, it returns null.