Name Description Size
FormAutoComplete.jsm An abstraction to talk with the FormHistory database over the message layer. FormHistoryClient will take care of figuring out the most appropriate message manager to use, and what things to send. It is assumed that nsFormAutoComplete will only ever use one instance at a time, and will not attempt to perform more than one search request with the same instance at a time. However, nsFormAutoComplete might call remove() any number of times with the same instance of the client. @param {Object} clientInfo Info required to build the FormHistoryClient @param {Node} clientInfo.formField A DOM node that we're requesting form history for. @param {string} clientInfo.inputName The name of the input to do the FormHistory look-up with. If this is searchbar-history, then formField needs to be null, otherwise constructing will throw. 21912
FormHistory.jsm FormHistory Used to store values that have been entered into forms which may later be used to automatically fill in the values when the form is visited again. search(terms, queryData, callback) Look up values that have been previously stored. terms - array of terms to return data for queryData - object that contains the query terms The query object contains properties for each search criteria to match, where the value of the property specifies the value that term must have. For example, { term1: value1, term2: value2 } callback - callback that is called when results are available or an error occurs. The callback is passed a result array containing each found entry. Each element in the array is an object containing a property for each search term specified by 'terms'. count(queryData, callback) Find the number of stored entries that match the given criteria. queryData - array of objects that indicate the query. See the search method for details. callback - callback that is called when results are available or an error occurs. The callback is passed the number of found entries. update(changes, callback) Write data to form history storage. changes - an array of changes to be made. If only one change is to be made, it may be passed as an object rather than a one-element array. Each change object is of the form: { op: operation, term1: value1, term2: value2, ... } Valid operations are: add - add a new entry update - update an existing entry remove - remove an entry bump - update the last accessed time on an entry The terms specified allow matching of one or more specific entries. If no terms are specified then all entries are matched. This means that { op: "remove" } is used to remove all entries and clear the form history. callback - callback that is called when results have been stored. getAutoCompeteResults(searchString, params, callback) Retrieve an array of form history values suitable for display in an autocomplete list. Returns an mozIStoragePendingStatement that can be used to cancel the operation if needed. searchString - the string to search for, typically the entered value of a textbox params - zero or more filter arguments: fieldname - form field name agedWeight bucketSize expiryDate maxTimeGroundings timeGroupingSize prefixWeight boundaryWeight source callback - callback that is called with the array of results. Each result in the array is an object with four arguments: text, textLowerCase, frecency, totalScore schemaVersion This property holds the version of the database schema Terms: guid - entry identifier. For 'add', a guid will be generated. fieldname - form field name value - form value timesUsed - the number of times the entry has been accessed firstUsed - the time the the entry was first created lastUsed - the time the entry was last accessed firstUsedStart - search for entries created after or at this time firstUsedEnd - search for entries created before or at this time lastUsedStart - search for entries last accessed after or at this time lastUsedEnd - search for entries last accessed before or at this time newGuid - a special case valid only for 'update' and allows the guid for an existing record to be updated. The 'guid' term is the only other term which can be used (ie, you can not also specify a fieldname, value etc) and indicates the guid of the existing record that should be updated. In all of the above methods, the callback argument should be an object with handleResult(result), handleFailure(error) and handleCompletion(reason) functions. For search and getAutoCompeteResults, result is an object containing the desired properties. For count, result is the integer count. For, update, handleResult is not called. For handleCompletion, reason is either 0 if successful or 1 if an error occurred. 44563
FormHistoryChild.jsm 3693
FormHistoryParent.jsm 1702
FormHistoryStartup.jsm 3288
InputListAutoComplete.jsm 1771
components.conf 1480 1200
nsFormAutoCompleteResult.jsm A reference to the form history nsIAutocompleteResult that we're wrapping. We use this to forward removeEntryAt calls as needed. 4747
nsFormFillController.cpp 38392
nsFormFillController.h Checks that aElement is a type of element we want to fill, then calls StartControllingInput on it. 4678
nsIFormAutoComplete.idl Generate results for a form input autocomplete menu asynchronously. 1692
nsIFormFillController.idl nsIFormFillController is an interface for controlling form fill behavior on HTML documents. Any number of docShells can be controller concurrently. While a docShell is attached, all HTML documents that are loaded within it will have a focus listener attached that will listen for when a text input is focused. When this happens, the input will be bound to the global nsIAutoCompleteController service. 2614
nsIInputListAutoComplete.idl Generate results for a form input autocomplete menu. 615
test 25
towel 264
.eslintrc.js 1263