Skip to content

domain/navigation/omnibox

OmniboxTarget = { kind: "url"; url: string; } | { kind: "search"; query: string; url: string; }

Defined in: app/src/domain/navigation/omnibox.ts:2

What the address bar should do with the user’s input.

resolveOmniboxInput(input, searchTemplate): OmniboxTarget | undefined

Defined in: app/src/domain/navigation/omnibox.ts:24

Decides whether address bar input is a URL or a search, and builds the URL to open. Hosts without a scheme get https://, except local hosts and IP addresses, which get http://. The web view normalizes the URL when it loads it.

string

What the user typed.

string

Search URL with %s for the encoded query.

OmniboxTarget | undefined

The target, or undefined for blank input.


searchUrl(query, searchTemplate): string

Defined in: app/src/domain/navigation/omnibox.ts:51

Builds the URL that searches for a query with the configured search engine.

string

The search terms.

string

Search URL with %s for the encoded query.

string