+ /**
+ * Returns true if the given search engine provides suggestions.
+ * engine based on the given *query*. The results are always in the
+ * form of an array of strings. If *callback* is provided, the
+ * request is executed asynchronously and *callback* is called on
+ * completion. Otherwise, the request is executed synchronously and
+ * the results are returned.
+ *
+ * @param {string} engineName The name of the search engine from
+ * which to request suggestions.
+ * @returns {boolean}
+ */
+ hasSuggestions: function hasSuggestions(engineName, query, callback) {
+ const responseType = "application/x-suggestions+json";
+
+ if (hasOwnProperty(this.suggestionProviders, engineName))
+ return true;
+
+ let engine = hasOwnProperty(this.searchEngines, engineName) && this.searchEngines[engineName];
+ if (engine && engine.supportsResponseType(responseType))
+ return true;
+
+ return false;
+ },
+