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.
7 * @fileoverview Defines a result type interface.
10 goog
.provide('cvox.AbstractResult');
12 goog
.require('cvox.SearchUtil');
17 cvox
.AbstractResult = function() { };
20 * Checks the result if it is an unknown result.
21 * @param {Element} result Result to be checked.
22 * @return {boolean} Whether or not the element is an unknown result.
24 cvox
.AbstractResult
.prototype.isType = function(result
) {
29 * Speak a generic search result.
30 * @param {Element} result Generic result to be spoken.
31 * @return {boolean} Whether or not the result was spoken.
33 cvox
.AbstractResult
.prototype.speak = function(result
) {
38 * Extracts the wikipedia URL from knowledge panel.
39 * @param {Element} result Result to extract from.
40 * @return {?string} URL.
42 cvox
.AbstractResult
.prototype.getURL
= cvox
.SearchUtil
.extractURL
;
45 * Returns the node to sync to.
46 * @param {Element} result Result.
47 * @return {?Node} Node to sync to.
49 cvox
.AbstractResult
.prototype.getSyncNode = function(result
) {