Chrome Flags Reference

Chrome command line switches and startup flags for automation, headless mode, and debugging.

--top-controls-hide-threshold

What does --top-controls-hide-threshold do?

Percentage of the browser controls need to be hidden before they will auto hide.

Usage

CLILaunch Chrome with --top-controls-hide-threshold using CLI

chrome --top-controls-hide-threshold

PuppeteerLaunch Chrome with --top-controls-hide-threshold using Puppeteer

const browser = await puppeteer.launch({
  args: ['--top-controls-hide-threshold']
});

PlaywrightLaunch Chrome with --top-controls-hide-threshold using Playwright

const browser = await chromium.launch({
  args: ['--top-controls-hide-threshold']
});

SeleniumLaunch Chrome with --top-controls-hide-threshold using Selenium

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument('--top-controls-hide-threshold')

driver = webdriver.Chrome(options=options)