The cr-search-control element provides the primary search interface for the protocol viewer. It includes a text input that, when typed into, fetches a protocol search index and displays matching results via a cr-search-results menu.
To use it, include the element in your HTML and provide the required attributes:
base-url: The base URL of the application.protocol-search-index: The path to the JSON search index relative to the base-url.
Keyboard interactions supported:
- ArrowDown / ArrowUp: Navigate through search results.
- Enter: Select the currently focused result.
- Escape: Clear the search input and blur the field.
- A-Z keys: Automatically focuses the search input.
<cr-search-control
base-url="/"
protocol-search-index="search-index.json">
</cr-search-control>