Readonly
appReadonly
appThe Application Default Engine object that is the default for this region when in private browsing mode, ignoring changes the user may have subsequently made.
The currently active search engine. Unless the application doesn't ship any search plugin, this should never be null. If the currently active engine is removed, this attribute will fallback first to the application default engine if it's not hidden, then to the first visible engine, and as a last resort it will unhide the app default engine.
The currently active search engine for private browsing mode.
defaultEngine.
Readonly
isDetermine whether initialization has been completed.
Clients of the service can use this attribute to quickly determine whether initialization is complete, and decide to trigger some immediate treatment, to launch asynchronous initialization or to bailout.
Note that this attribute does not indicate that initialization has succeeded.
|true| if the search service is now initialized, |false| if initialization has not been triggered yet.
Readonly
separateWhether to display the "Search in Private Window" result in the urlbar.
Optional
aInstancePtr: objectA run time mechanism for interface discovery.
NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.
aInstancePtr must not be null.
[in] A requested interface IID
[out] A pointer to an interface pointer to receive the result.
Adds search providers to the search service. If the search service is configured to load multiple locales for the extension, it may load more than one search engine. If called directly ensure the extension has been initialised.
Promise that resolves when finished.
The extension to load from.
Adds a new Open Search engine from the file at the supplied URI.
NS_ERROR_FAILURE if the description file cannot be successfully loaded.
The URL to the search engine's description file.
A URL string to an icon file to be used as the search engine's icon. This value may be overridden by an icon specified in the engine description file.
Adds a new search engine defined by the user.
The name of the engine.
The url of the engine with %s denoting where to replace the search term.
[optional] The alias to refer to the engine.
Gets a representation of the default engine in an anonymized JSON string suitable for recording in the Telemetry environment.
result contains anonymized info about the default engine(s).
result.defaultSearchEngine contains the telemetry id of the default engine.
result.defaultSearchEngineData contains information about the default engine: name, loadPath, original submissionURL
[result.defaultPrivateSearchEngine] only returned if the preference for having a separate engine in private mode is turned on. contains the telemetry id of the default engine for private browsing mode.
[result.defaultPrivateSearchEngineData] only returned if the preference for having a separate engine in private mode is turned on. contains information about the default engine for private browsing mode: name, loadPath, original submissionURL
Start asynchronous initialization.
The promise is resolved once initialization is complete, which may be immediately, if initialization has already been completed by some previous call to this method. This method should only be called when you need or want to wait for the full initialization of the search service.
Allows the add-on manager to discover if a WebExtension based search engine may change the default to an application provided search engine. If that WebExtension is on the allow list, then it will override the built-in engine's urls and parameters.
An object with two booleans:
The extension to load from.
Moves a visible search engine.
NS_ERROR_FAILURE if newIndex is out of bounds, or if engine is hidden.
The engine to move.
The engine's new index in the set of visible engines.
Determines if the provided URL represents results from a search engine, and provides details about the match.
The lookup mechanism checks whether the domain name and path of the provided HTTP or HTTPS URL matches one of the known values for the visible search engines. The match does not depend on which of the schemes is used. The expected URI parameter for the search terms must exist in the query string, but other parameters are ignored.
String containing the URL to parse, for example "https://www.google.com/search?q=terms".
Removes the search engine. If the search engine is installed in a global location, this will just hide the engine. If the engine is in the user's profile directory, it will be removed from disk.
The engine to remove.
Generated using TypeDoc
The Application Default Engine object that is the default for this region, ignoring changes the user may have subsequently made.