Interface nsIAutoCompleteControllerType

Hierarchy

Properties

input: nsIAutoCompleteInput

The input widget that is currently being controlled.

matchCount: number

The number of matches

searchStatus: number

State which indicates the status of possible ongoing searches

searchString: string

Get / set the current search string. Note, setting will not start searching

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Get the comment of the result at a given index in the last completed search

    Parameters

    • index: number

    Returns string

  • For the last completed search, get the final value that should be completed when the user confirms the match at the given index

    Parameters

    • index: number

    Returns string

  • Get the url of the image of the result at a given index in the last completed search

    Parameters

    • index: number

    Returns string

  • Get the label of the result at a given index in the last completed search

    Parameters

    • index: number

    Returns string

  • Get the style hint for the result at a given index in the last completed search

    Parameters

    • index: number

    Returns string

  • Get the value of the result at a given index in the last completed search

    Parameters

    • index: number

    Returns string

  • Notify the controller that the user chose to delete the current auto-complete result.

    Returns

    Whether the controller removed a result item.

    Returns boolean

  • Notify the controller that the user wishes to end composition

    NOTE: nsIAutoCompleteController implementation expects that this is called by DOM compositionend handler.

    Returns void

  • Notify the controller that the user wishes to enter the current text. If aIsPopupSelection is true, then a selection was made from the popup, so fill this value into the input field before continuing. If false, just use the current value of the input field.

    Returns

    Whether the controller wishes to prevent event propagation and default event.

    Parameters

    • aIsPopupSelection: boolean

      Pass true if the selection was made from the popup.

    • aEvent: Event

      The event that triggered the enter, like a key event if the user pressed the Return key or a click event if the user clicked a popup item.

    Returns boolean

  • Notify the controller that the user wishes to revert autocomplete

    Returns

    Whether the controller wishes to prevent event propagation and default event.

    Returns boolean

  • Notify the controller of the following key navigation events: up, down, left, right, page up, page down

    Returns

    Whether the controller wishes to prevent event propagation and default event

    Parameters

    • key: number

    Returns boolean

  • Notify the controller that the user wishes to start composition

    NOTE: nsIAutoCompleteController implementation expects that this is called by DOM compositionstart handler.

    Returns void

  • Handle tab. Just closes up.

    Returns void

  • Notify the controller that the user has changed text in the textbox. This includes all means of changing the text value, including typing a character, backspacing, deleting, pasting, committing composition or canceling composition.

    NOTE: handleText() must be called after composition actually ends, even if the composition is canceled and the textbox value isn't changed. Then, implementation of handleText() can access the editor when it's not in composing mode. DOM compositionend event is not good timing for calling handleText(). DOM input event immediately after DOM compositionend event is the best timing to call this.

    Returns

    whether this handler started a new search.

    Returns boolean

  • Reset controller internal caches for cases where the input doesn't change but its context resets, thus it is about to start a completely new search session.

    Returns void

  • Set the index of the result item that should be initially selected. This should be used when a search wants to pre-select an element before the user starts using results.

    Note

    Setting this is not the same as just setting selectedIndex in nsIAutocompletePopup, since this will take care of updating any internal tracking variables of features like completeSelectedIndex.

    Parameters

    • index: number

    Returns void

  • Start a search on a string, assuming the input property is already set.

    Parameters

    • searchString: string

    Returns void

  • Stop all asynchronous searches

    Returns void

Generated using TypeDoc