bare_object_walker.js revision cedac228d2dd51db4b79ea1e72c7f249408ee061
1// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5/**
6 * @fileoverview A JavaScript class for walking the leaf nodes of the dom.
7 * This is a bare class that tries to limit dependencies. It should only be used
8 * when traversal of the leaf nodes is required (e.g. by other walkers), but
9 * no other walker functionality (such as being able to describe the position).
10 * It should not be used for user-visible navigation.
11 */
12
13
14goog.provide('cvox.BareObjectWalker');
15
16goog.require('cvox.AbstractNodeWalker');
17
18/**
19 * @constructor
20 * @extends {cvox.AbstractNodeWalker}
21 */
22cvox.BareObjectWalker = function() {
23  goog.base(this);
24};
25goog.inherits(cvox.BareObjectWalker, cvox.AbstractNodeWalker);
26
27/**
28 * @override
29 */
30cvox.BareObjectWalker.prototype.stopNodeDescent = function(node) {
31  return cvox.DomUtil.isLeafNode(node);
32};
33