Constructor
new Autocomplete(options)
- Source:
Create an autocomplete instance. An instance is a set of settings and inputs to which these settings apply.
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
Properties
|
Members
tribute :Tribute
- Source:
Tribute object.
Type:
- Tribute
Methods
(static) getActiveMenu() → {Element}
- Source:
Get the active autocomplete menu element.
Returns:
- Type
- Element
(static) getConfig(type, …args) → {object}
- Source:
For internal use. Get an autocomplete configuration for the specified type.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
type |
string | ||
args |
* |
<repeatable> |
Returns:
- Type
- object
(static) getRelevantPageNames(text) → {Promise.<Array.<string>>}
- Source:
Get a list of 10 page names matching the specified search text. Page names are sorted as OpenSearch sorts them. Redirects are not resolved.
Reuses the existing request if available.
Parameters:
Name | Type | Description |
---|---|---|
text |
string |
Throws:
Returns:
- Type
- Promise.<Array.<string>>
(static) getRelevantTemplateNames(text) → {Promise.<Array.<string>>}
- Source:
Get a list of 10 template names matching the specified search text. Template names are sorted as OpenSearch sorts them. Redirects are not resolved.
Reuses the existing request if available.
Parameters:
Name | Type | Description |
---|---|---|
text |
string |
Throws:
Returns:
- Type
- Promise.<Array.<string>>
(static) getRelevantUserNames(text) → {Promise.<Array.<string>>}
- Source:
Get a list of 10 user names matching the specified search text. User names are sorted as OpenSearch sorts them. Only users with a talk page existent are included. Redirects are resolved.
Reuses the existing request if available.
Parameters:
Name | Type | Description |
---|---|---|
text |
string |
Throws:
Returns:
- Type
- Promise.<Array.<string>>
cleanUp()
- Source:
Clean up event handlers.
init()
- Source:
Initialize autocomplete for the inputs.