| // Copyright 2010 Google Inc. All Rights Reserved. |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS-IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| |
| /** |
| * @fileoverview Interface for detector classes. |
| */ |
| |
| |
| goog.provide('bidichecker.Detector'); |
| |
| |
| // For a description of the architecture of DOM contents scanning, see the |
| // comment at the start of scanner.js. |
| |
| /** |
| * Interface for detector classes. A detector listens to events from a walker |
| * to identify content of interest for a particular purpose, such as finding |
| * bidi errors of a given type. |
| * <p>A detector instance is used in the context of a particular document (DOM) |
| * to be scanned, and is not reused. Thus when a page containing frames is |
| * scanned, there is a separate detector for each frame, as well as the one for |
| * the top-level page. |
| * @interface |
| */ |
| bidichecker.Detector = function() {}; |
| |
| |
| /** |
| * Start listening to events generated by walkers. |
| * @param {!bidichecker.Scanner} scanner Provides methods for accessing the |
| * {@code DomWalker} and/or {@code DirChunkWalker} for the current DOM. |
| */ |
| bidichecker.Detector.prototype.startListening = function(scanner) {}; |