Namespace chip.search
The namespace for the CHIP API's search contract with
CHIP search-related functionality. With this contract, the CHIP can provide CHIP-specific
search keywords. In addition, it can highlight words from the search in its UI.
Defined in: search.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
chip.search.attachHighlight(fnEventHandler)
Attaches the given event handler to the "highlight" event which is fired whenever the user
executes a search over all CHIPs using specific search terms.
|
| <static> |
chip.search.setKeywords(aNewKeywords)
Determines specific keywords with which the CHIP wants to be found in a search over all
CHIPs from the page builder.
|
Method Detail
<static>
chip.search.attachHighlight(fnEventHandler)
Attaches the given event handler to the "highlight" event which is fired whenever the user
executes a search over all CHIPs using specific search terms. The event handler takes a
string array as parameter, containing the highlight words. These are derived from the
search terms. The CHIP can then highlight these in its UI.
- Parameters:
- {function (string[])} fnEventHandler
- event handler for highlighting words in the CHIP UI which takes a string array with the highlight words as parameter
- Since:
- 1.11.0
<static>
chip.search.setKeywords(aNewKeywords)
Determines specific keywords with which the CHIP wants to be found in a search over all
CHIPs from the page builder. If not set, the page builder executing a CHIP search can only
search based on CHIP metadata like the CHIP title.
- Parameters:
- {string[]} aNewKeywords
- the keywords of this CHIP
- Since:
- 1.11.0