Address Bar¶
This document describes the implementation of Firefox’s address bar, also known as the quantumbar or urlbar. The address bar was also called the awesomebar until Firefox 68, when it was substantially rewritten.
The address bar is a specialized search access point that aggregates data from several different sources, including:
Places (Firefox’s history and bookmarks system)
Search engines (including search suggestions)
WebExtensions
Open tabs
Where to Start¶
If you want a high level, nontechnical summary of how the address bar works, read Nontechnical Overview.
If you are interested in the technical details, you might want to skip ahead to Architecture Overview.
Codebase¶
The address bar code lives in browser/components/urlbar.
Table of Contents¶
- Nontechnical Overview
- Architecture Overview
- Search Lifecycle
- Utilities
- Telemetry
- Histograms
- Scalars
- urlbar.abandonment
- urlbar.autofill_deletion
- urlbar.engagement
- urlbar.impression.*
- urlbar.persistedsearchterms.revert_by_popup_count
- urlbar.persistedsearchterms.view_count
- urlbar.tips
- urlbar.searchmode.*
- urlbar.picked.*
- urlbar.picked.searchmode.*
- urlbar.tabtosearch.*
- urlbar.zeroprefix.abandonment
- urlbar.zeroprefix.engagement
- urlbar.zeroprefix.exposure
- urlbar.quickaction.picked
- places.*
- Search Engagement Telemetry
- Custom pings for Contextual Services
- Other telemetry relevant to the Address Bar
- Firefox Suggest Telemetry
- Histograms
- Scalars
- browser.ui.interaction.preferences_panePrivacy
- contextual.services.quicksuggest.block_dynamic_wikipedia
- contextual.services.quicksuggest.block_nonsponsored
- contextual.services.quicksuggest.block_nonsponsored_bestmatch
- contextual.services.quicksuggest.block_sponsored
- contextual.services.quicksuggest.block_sponsored_bestmatch
- contextual.services.quicksuggest.block_weather
- contextual.services.quicksuggest.click
- contextual.services.quicksuggest.click_dynamic_wikipedia
- contextual.services.quicksuggest.click_nav_notmatched
- contextual.services.quicksuggest.click_nav_shown_heuristic
- contextual.services.quicksuggest.click_nav_shown_nav
- contextual.services.quicksuggest.click_nav_superceded
- contextual.services.quicksuggest.click_nonsponsored
- contextual.services.quicksuggest.click_nonsponsored_bestmatch
- contextual.services.quicksuggest.click_sponsored
- contextual.services.quicksuggest.click_sponsored_bestmatch
- contextual.services.quicksuggest.click_weather
- contextual.services.quicksuggest.exposure_weather
- contextual.services.quicksuggest.help
- contextual.services.quicksuggest.help_dynamic_wikipedia
- contextual.services.quicksuggest.help_nonsponsored
- contextual.services.quicksuggest.help_nonsponsored_bestmatch
- contextual.services.quicksuggest.help_sponsored
- contextual.services.quicksuggest.help_sponsored_bestmatch
- contextual.services.quicksuggest.help_weather
- contextual.services.quicksuggest.impression
- contextual.services.quicksuggest.impression_dynamic_wikipedia
- contextual.services.quicksuggest.impression_nav_notmatched
- contextual.services.quicksuggest.impression_nav_shown
- contextual.services.quicksuggest.impression_nav_superceded
- contextual.services.quicksuggest.impression_nonsponsored
- contextual.services.quicksuggest.impression_nonsponsored_bestmatch
- contextual.services.quicksuggest.impression_sponsored
- contextual.services.quicksuggest.impression_sponsored_bestmatch
- contextual.services.quicksuggest.impression_weather
- Events
- Environment
- The “quick-suggest” Ping
- Nimbus Exposure Event
- Merino Search Queries
- Debugging & Logging
- Ranking
- Dynamic Result Types
- Preferences
- Testing
- Getting in Touch
API Reference¶
- UrlbarController Reference
UrlbarController
UrlbarController.UrlbarController
UrlbarController.userSelectionBehavior
UrlbarController.addQueryListener()
UrlbarController.cancelQuery()
UrlbarController.clearLastQueryContextCache()
UrlbarController.handleKeyNavigation()
UrlbarController.keyEventMovesCaret()
UrlbarController.notify()
UrlbarController.receiveResults()
UrlbarController.recordSelectedResult()
UrlbarController.removeQueryListener()
UrlbarController.removeResult()
UrlbarController.setLastQueryContextCache()
UrlbarController.setView()
UrlbarController.speculativeConnect()
UrlbarController.startQuery()
- UrlbarInput Reference
UrlbarInput
UrlbarInput.UrlbarInput
UrlbarInput._autofillFirstResult()
UrlbarInput._autofillValue()
UrlbarInput._loadURL()
UrlbarInput._maybeAutofillPlaceholder()
UrlbarInput._maybeCanonizeURL()
UrlbarInput._maybeSelectAll()
UrlbarInput._notifyStartNavigation()
UrlbarInput._recordSearch()
UrlbarInput._resetSearchState()
UrlbarInput._searchModeForResult()
UrlbarInput._setValue()
UrlbarInput._trimValue()
UrlbarInput._updateSearchModeUI()
UrlbarInput._whereToOpen()
UrlbarInput.afterTabSwitchFocusChange()
UrlbarInput.confirmSearchMode()
UrlbarInput.formatValue()
UrlbarInput.getSearchMode()
UrlbarInput.getSearchSource()
UrlbarInput.handleCommand()
UrlbarInput.handleEvent()
UrlbarInput.handleNavigation()
UrlbarInput.handoff()
UrlbarInput.makeURIReadable()
UrlbarInput.maybeConfirmSearchModeFromResult()
UrlbarInput.onFirstResult()
UrlbarInput.pickElement()
UrlbarInput.pickResult()
UrlbarInput.removeHiddenFocus()
UrlbarInput.restoreSearchModeState()
UrlbarInput.sanitizeTextFromClipboard()
UrlbarInput.search()
UrlbarInput.searchModeShortcut()
UrlbarInput.setHiddenFocus()
UrlbarInput.setPageProxyState()
UrlbarInput.setResultForCurrentValue()
UrlbarInput.setSearchMode()
UrlbarInput.setURI()
UrlbarInput.setValueFromResult()
UrlbarInput.startQuery()
UrlbarInput.updateTextOverflow()
- UrlbarView Reference
UrlbarView
UrlbarView.UrlbarView
UrlbarView.isOpen
UrlbarView.selectedElement
UrlbarView.selectedResult
UrlbarView.visibleRowCount
UrlbarView.autoOpen()
UrlbarView.clearSelection()
UrlbarView.close()
UrlbarView.getFirstSelectableElement()
UrlbarView.getLastSelectableElement()
UrlbarView.getResultAtIndex()
UrlbarView.getResultFromElement()
UrlbarView.handleEvent()
UrlbarView.hideTemporarily()
UrlbarView.invalidateResultMenuCommands()
UrlbarView.onQueryResultRemoved()
UrlbarView.restoreVisibility()
UrlbarView.resultIsSelected()
UrlbarView.selectBy()
UrlbarView.shouldSpaceActivateSelectedElement()
UrlbarView.addDynamicViewTemplate
UrlbarView.removeDynamicViewTemplate