domain/navigation/omnibox
Type Aliases
Section titled “Type Aliases”OmniboxTarget
Section titled “OmniboxTarget”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.
Functions
Section titled “Functions”resolveOmniboxInput()
Section titled “resolveOmniboxInput()”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.
Parameters
Section titled “Parameters”string
What the user typed.
searchTemplate
Section titled “searchTemplate”string
Search URL with %s for the encoded query.
Returns
Section titled “Returns”OmniboxTarget | undefined
The target, or undefined for blank input.
searchUrl()
Section titled “searchUrl()”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.
Parameters
Section titled “Parameters”string
The search terms.
searchTemplate
Section titled “searchTemplate”string
Search URL with %s for the encoded query.
Returns
Section titled “Returns”string