CINXE.COM

chrome.scripting  |  API  |  Chrome for Developers

<!doctype html> <html lang="en" dir="ltr"> <head> <meta name="google-signin-client-id" content="157101835696-ooapojlodmuabs2do2vuhhnf90bccmoi.apps.googleusercontent.com"> <meta name="google-signin-scope" content="profile email https://www.googleapis.com/auth/developerprofiles https://www.googleapis.com/auth/developerprofiles.award"> <meta property="og:site_name" content="Chrome for Developers"> <meta property="og:type" content="website"><meta name="theme-color" content="#1a73e8"><meta charset="utf-8"> <meta content="IE=Edge" http-equiv="X-UA-Compatible"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="manifest" href="/_pwa/chrome/manifest.json" crossorigin="use-credentials"> <link rel="preconnect" href="//www.gstatic.com" crossorigin> <link rel="preconnect" href="//fonts.gstatic.com" crossorigin> <link rel="preconnect" href="//fonts.googleapis.com" crossorigin> <link rel="preconnect" href="//apis.google.com" crossorigin> <link rel="preconnect" href="//www.google-analytics.com" crossorigin><link rel="stylesheet" href="//fonts.googleapis.com/css?family=Google+Sans:400,500|Roboto:400,400italic,500,500italic,700,700italic|Roboto+Mono:400,500,700&display=swap"> <link rel="stylesheet" href="//fonts.googleapis.com/css2?family=Material+Icons&family=Material+Symbols+Outlined&display=block"><link rel="stylesheet" href="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/chrome/css/app.css"> <link rel="stylesheet" href="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/chrome/css/dark-theme.css" disabled> <link rel="shortcut icon" href="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/chrome/images/favicon.png"> <link rel="apple-touch-icon" href="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/chrome/images/touchicon-180.png"><link rel="canonical" href="https://developer.chrome.com/docs/extensions/reference/api/scripting"><link rel="search" type="application/opensearchdescription+xml" title="Chrome for Developers" href="https://developer.chrome.com/s/opensearch.xml"> <link rel="alternate" hreflang="en" href="https://developer.chrome.com/docs/extensions/reference/api/scripting" /><link rel="alternate" hreflang="x-default" href="https://developer.chrome.com/docs/extensions/reference/api/scripting" /><link rel="alternate" hreflang="ar" href="https://developer.chrome.com/docs/extensions/reference/api/scripting?hl=ar" /><link rel="alternate" hreflang="bn" href="https://developer.chrome.com/docs/extensions/reference/api/scripting?hl=bn" /><link rel="alternate" hreflang="zh-Hans" href="https://developer.chrome.com/docs/extensions/reference/api/scripting?hl=zh-cn" /><link rel="alternate" hreflang="zh-Hant" href="https://developer.chrome.com/docs/extensions/reference/api/scripting?hl=zh-tw" /><link rel="alternate" hreflang="nl" href="https://developer.chrome.com/docs/extensions/reference/api/scripting?hl=nl" /><link rel="alternate" hreflang="fa" href="https://developer.chrome.com/docs/extensions/reference/api/scripting?hl=fa" /><link rel="alternate" hreflang="fr" href="https://developer.chrome.com/docs/extensions/reference/api/scripting?hl=fr" /><link rel="alternate" hreflang="de" href="https://developer.chrome.com/docs/extensions/reference/api/scripting?hl=de" /><link rel="alternate" hreflang="he" href="https://developer.chrome.com/docs/extensions/reference/api/scripting?hl=he" /><link rel="alternate" hreflang="hi" href="https://developer.chrome.com/docs/extensions/reference/api/scripting?hl=hi" /><link rel="alternate" hreflang="id" href="https://developer.chrome.com/docs/extensions/reference/api/scripting?hl=id" /><link rel="alternate" hreflang="it" href="https://developer.chrome.com/docs/extensions/reference/api/scripting?hl=it" /><link rel="alternate" hreflang="ja" href="https://developer.chrome.com/docs/extensions/reference/api/scripting?hl=ja" /><link rel="alternate" hreflang="ko" href="https://developer.chrome.com/docs/extensions/reference/api/scripting?hl=ko" /><link rel="alternate" hreflang="pl" href="https://developer.chrome.com/docs/extensions/reference/api/scripting?hl=pl" /><link rel="alternate" hreflang="pt-BR" href="https://developer.chrome.com/docs/extensions/reference/api/scripting?hl=pt-br" /><link rel="alternate" hreflang="ru" href="https://developer.chrome.com/docs/extensions/reference/api/scripting?hl=ru" /><link rel="alternate" hreflang="es-419" href="https://developer.chrome.com/docs/extensions/reference/api/scripting?hl=es-419" /><link rel="alternate" hreflang="th" href="https://developer.chrome.com/docs/extensions/reference/api/scripting?hl=th" /><link rel="alternate" hreflang="tr" href="https://developer.chrome.com/docs/extensions/reference/api/scripting?hl=tr" /><link rel="alternate" hreflang="vi" href="https://developer.chrome.com/docs/extensions/reference/api/scripting?hl=vi" /><link rel="alternate" hreflang="en-cn" href="https://developer.chrome.google.cn/docs/extensions/reference/api/scripting" /><link rel="alternate" hreflang="x-default" href="https://developer.chrome.google.cn/docs/extensions/reference/api/scripting" /><link rel="alternate" hreflang="ar-cn" href="https://developer.chrome.google.cn/docs/extensions/reference/api/scripting?hl=ar" /><link rel="alternate" hreflang="bn-cn" href="https://developer.chrome.google.cn/docs/extensions/reference/api/scripting?hl=bn" /><link rel="alternate" hreflang="zh-Hans-cn" href="https://developer.chrome.google.cn/docs/extensions/reference/api/scripting?hl=zh-cn" /><link rel="alternate" hreflang="zh-Hant-cn" href="https://developer.chrome.google.cn/docs/extensions/reference/api/scripting?hl=zh-tw" /><link rel="alternate" hreflang="nl-cn" href="https://developer.chrome.google.cn/docs/extensions/reference/api/scripting?hl=nl" /><link rel="alternate" hreflang="fa-cn" href="https://developer.chrome.google.cn/docs/extensions/reference/api/scripting?hl=fa" /><link rel="alternate" hreflang="fr-cn" href="https://developer.chrome.google.cn/docs/extensions/reference/api/scripting?hl=fr" /><link rel="alternate" hreflang="de-cn" href="https://developer.chrome.google.cn/docs/extensions/reference/api/scripting?hl=de" /><link rel="alternate" hreflang="he-cn" href="https://developer.chrome.google.cn/docs/extensions/reference/api/scripting?hl=he" /><link rel="alternate" hreflang="hi-cn" href="https://developer.chrome.google.cn/docs/extensions/reference/api/scripting?hl=hi" /><link rel="alternate" hreflang="id-cn" href="https://developer.chrome.google.cn/docs/extensions/reference/api/scripting?hl=id" /><link rel="alternate" hreflang="it-cn" href="https://developer.chrome.google.cn/docs/extensions/reference/api/scripting?hl=it" /><link rel="alternate" hreflang="ja-cn" href="https://developer.chrome.google.cn/docs/extensions/reference/api/scripting?hl=ja" /><link rel="alternate" hreflang="ko-cn" href="https://developer.chrome.google.cn/docs/extensions/reference/api/scripting?hl=ko" /><link rel="alternate" hreflang="pl-cn" href="https://developer.chrome.google.cn/docs/extensions/reference/api/scripting?hl=pl" /><link rel="alternate" hreflang="pt-BR-cn" href="https://developer.chrome.google.cn/docs/extensions/reference/api/scripting?hl=pt-br" /><link rel="alternate" hreflang="ru-cn" href="https://developer.chrome.google.cn/docs/extensions/reference/api/scripting?hl=ru" /><link rel="alternate" hreflang="es-419-cn" href="https://developer.chrome.google.cn/docs/extensions/reference/api/scripting?hl=es-419" /><link rel="alternate" hreflang="th-cn" href="https://developer.chrome.google.cn/docs/extensions/reference/api/scripting?hl=th" /><link rel="alternate" hreflang="tr-cn" href="https://developer.chrome.google.cn/docs/extensions/reference/api/scripting?hl=tr" /><link rel="alternate" hreflang="vi-cn" href="https://developer.chrome.google.cn/docs/extensions/reference/api/scripting?hl=vi" /><title>chrome.scripting &nbsp;|&nbsp; API &nbsp;|&nbsp; Chrome for Developers</title> <meta property="og:title" content="chrome.scripting &nbsp;|&nbsp; API &nbsp;|&nbsp; Chrome for Developers"><meta property="og:url" content="https://developer.chrome.com/docs/extensions/reference/api/scripting"><meta property="og:locale" content="en"><script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Article", "headline": "chrome.scripting" } </script><script type="application/ld+json"> { "@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [{ "@type": "ListItem", "position": 1, "name": "Docs", "item": "https://developer.chrome.com/docs" },{ "@type": "ListItem", "position": 2, "name": "Chrome Extensions", "item": "https://developer.chrome.com/docs/extensions" },{ "@type": "ListItem", "position": 3, "name": "Reference", "item": "https://developer.chrome.com/docs/extensions/reference" },{ "@type": "ListItem", "position": 4, "name": "API", "item": "https://developer.chrome.com/docs/extensions/reference/api" },{ "@type": "ListItem", "position": 5, "name": "chrome.scripting", "item": "https://developer.chrome.com/docs/extensions/reference/api/scripting" }] } </script> <link rel="stylesheet" href="/extras.css"></head> <body class="" template="page" theme="chrome-theme" type="article" appearance layout="docs" display-toc pending> <devsite-progress type="indeterminate" id="app-progress"></devsite-progress> <section class="devsite-wrapper"> <devsite-cookie-notification-bar></devsite-cookie-notification-bar><devsite-header role="banner"> <div class="devsite-header--inner nocontent"> <div class="devsite-top-logo-row-wrapper-wrapper"> <div class="devsite-top-logo-row-wrapper"> <div class="devsite-top-logo-row"> <button type="button" id="devsite-hamburger-menu" class="devsite-header-icon-button button-flat material-icons gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Navigation menu button" visually-hidden aria-label="Open menu"> </button> <div class="devsite-product-name-wrapper"> <a href="/" class="devsite-site-logo-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Site logo" track-type="globalNav" track-name="chromeForDevelopers" track-metadata-position="nav" track-metadata-eventDetail="nav"> <picture> <source srcset="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/chrome/images/lockup-dark-theme.svg" media="(prefers-color-scheme: dark)" class="devsite-dark-theme" alt="Chrome for Developers"> <img src="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/chrome/images/lockup.svg" class="devsite-site-logo" alt="Chrome for Developers"> </picture> </a> <span class="devsite-product-name"> <ul class="devsite-breadcrumb-list" > <li class="devsite-breadcrumb-item "> </li> </ul> </span> </div> <div class="devsite-top-logo-row-middle"> <div class="devsite-header-upper-tabs"> <devsite-tabs class="upper-tabs"> <nav class="devsite-tabs-wrapper" aria-label="Upper tabs"> <tab > <a href="https://developer.chrome.com/case-studies" track-metadata-eventdetail="https://developer.chrome.com/case-studies" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - get inspired" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Get inspired" track-name="get inspired" > Get inspired </a> </tab> <tab > <a href="https://developer.chrome.com/blog" track-metadata-eventdetail="https://developer.chrome.com/blog" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - blog" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Blog" track-name="blog" > Blog </a> </tab> <tab class="devsite-dropdown devsite-dropdown-full devsite-active "> <a href="https://developer.chrome.com/docs" track-metadata-eventdetail="https://developer.chrome.com/docs" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - docs" track-metadata-module="primary nav" aria-label="Docs, selected" data-category="Site-Wide Custom Events" data-label="Tab: Docs" track-name="docs" > Docs </a> <a href="#" role="button" aria-haspopup="true" aria-expanded="false" aria-label="Dropdown menu for Docs" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs" track-metadata-position="nav - docs" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Docs" track-name="docs" class="devsite-tabs-dropdown-toggle devsite-icon devsite-icon-arrow-drop-down"></a> <div class="devsite-tabs-dropdown" aria-label="submenu" hidden> <div class="devsite-tabs-dropdown-content"> <div class="devsite-tabs-dropdown-column "> <ul class="devsite-tabs-dropdown-section build-icon dcc-subnav"> <li class="devsite-nav-title" role="heading" tooltip>Build with Chrome</li> <li class="devsite-nav-description">Learn how Chrome works, participate in origin trials, and build with Chrome everywhere. </li> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/docs/web-platform" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs/web-platform" track-metadata-position="nav - docs" track-metadata-module="tertiary nav" track-metadata-module_headline="build with chrome" tooltip > <div class="devsite-nav-item-title"> Web Platform </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/docs/capabilities" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs/capabilities" track-metadata-position="nav - docs" track-metadata-module="tertiary nav" track-metadata-module_headline="build with chrome" tooltip > <div class="devsite-nav-item-title"> Capabilities </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/docs/chromedriver" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs/chromedriver" track-metadata-position="nav - docs" track-metadata-module="tertiary nav" track-metadata-module_headline="build with chrome" tooltip > <div class="devsite-nav-item-title"> ChromeDriver </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/docs/extensions" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs/extensions" track-metadata-position="nav - docs" track-metadata-module="tertiary nav" track-metadata-module_headline="build with chrome" tooltip > <div class="devsite-nav-item-title"> Extensions </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/docs/webstore" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs/webstore" track-metadata-position="nav - docs" track-metadata-module="tertiary nav" track-metadata-module_headline="build with chrome" tooltip > <div class="devsite-nav-item-title"> Chrome Web Store </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/docs/chromium" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs/chromium" track-metadata-position="nav - docs" track-metadata-module="tertiary nav" track-metadata-module_headline="build with chrome" tooltip > <div class="devsite-nav-item-title"> Chromium </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/docs/aurora" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs/aurora" track-metadata-position="nav - docs" track-metadata-module="tertiary nav" track-metadata-module_headline="build with chrome" tooltip > <div class="devsite-nav-item-title"> Aurora </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/docs/android" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs/android" track-metadata-position="nav - docs" track-metadata-module="tertiary nav" track-metadata-module_headline="build with chrome" tooltip > <div class="devsite-nav-item-title"> Web on Android </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/origintrials/" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/origintrials/" track-metadata-position="nav - docs" track-metadata-module="tertiary nav" track-metadata-module_headline="build with chrome" tooltip > <div class="devsite-nav-item-title"> Origin trials </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/release-notes" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/release-notes" track-metadata-position="nav - docs" track-metadata-module="tertiary nav" track-metadata-module_headline="build with chrome" tooltip > <div class="devsite-nav-item-title"> Release notes </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column "> <ul class="devsite-tabs-dropdown-section productivity-icon dcc-subnav"> <li class="devsite-nav-title" role="heading" tooltip>Productivity</li> <li class="devsite-nav-description">Create the best experience for your users with the web&#39;s best tools.</li> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/docs/devtools" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs/devtools" track-metadata-position="nav - docs" track-metadata-module="tertiary nav" track-metadata-module_headline="productivity" tooltip > <div class="devsite-nav-item-title"> DevTools </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/docs/lighthouse" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs/lighthouse" track-metadata-position="nav - docs" track-metadata-module="tertiary nav" track-metadata-module_headline="productivity" tooltip > <div class="devsite-nav-item-title"> Lighthouse </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/docs/crux" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs/crux" track-metadata-position="nav - docs" track-metadata-module="tertiary nav" track-metadata-module_headline="productivity" tooltip > <div class="devsite-nav-item-title"> Chrome UX Report </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/docs/accessibility" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs/accessibility" track-metadata-position="nav - docs" track-metadata-module="tertiary nav" track-metadata-module_headline="productivity" tooltip > <div class="devsite-nav-item-title"> Accessibility </div> </a> </li> </ul> <ul class="devsite-tabs-dropdown-section dcc-subnav second-column-list"> <li class="devsite-nav-description">Get things done quicker and neater, with our ready-made libraries. </li> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/docs/workbox" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs/workbox" track-metadata-position="nav - docs" track-metadata-module="tertiary nav" track-metadata-module_headline="productivity" tooltip > <div class="devsite-nav-item-title"> Workbox </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/docs/puppeteer" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs/puppeteer" track-metadata-position="nav - docs" track-metadata-module="tertiary nav" track-metadata-module_headline="productivity" tooltip > <div class="devsite-nav-item-title"> Puppeteer </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column "> <ul class="devsite-tabs-dropdown-section experience-icon dcc-subnav"> <li class="devsite-nav-title" role="heading" tooltip>Experience</li> <li class="devsite-nav-description">Design a beautiful and performant web with Chrome. </li> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/docs/ai" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs/ai" track-metadata-position="nav - docs" track-metadata-module="tertiary nav" track-metadata-module_headline="experience" tooltip > <div class="devsite-nav-item-title"> AI </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/docs/performance" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs/performance" track-metadata-position="nav - docs" track-metadata-module="tertiary nav" track-metadata-module_headline="experience" tooltip > <div class="devsite-nav-item-title"> Performance </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/docs/css-ui" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs/css-ui" track-metadata-position="nav - docs" track-metadata-module="tertiary nav" track-metadata-module_headline="experience" tooltip > <div class="devsite-nav-item-title"> CSS and UI </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/docs/identity" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs/identity" track-metadata-position="nav - docs" track-metadata-module="tertiary nav" track-metadata-module_headline="experience" tooltip > <div class="devsite-nav-item-title"> Identity </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/docs/payments" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs/payments" track-metadata-position="nav - docs" track-metadata-module="tertiary nav" track-metadata-module_headline="experience" tooltip > <div class="devsite-nav-item-title"> Payments </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/docs/privacy-security" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs/privacy-security" track-metadata-position="nav - docs" track-metadata-module="tertiary nav" track-metadata-module_headline="experience" tooltip > <div class="devsite-nav-item-title"> Privacy and security </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column "> <ul class="devsite-tabs-dropdown-section resources-icon dcc-subnav"> <li class="devsite-nav-title" role="heading" tooltip>Resources</li> <li class="devsite-nav-description">More from the Chrome team. </li> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/docs" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs" track-metadata-position="nav - docs" track-metadata-module="tertiary nav" track-metadata-module_headline="resources" tooltip > <div class="devsite-nav-item-title"> All documentation </div> </a> </li> <li class="devsite-nav-item"> <a href="https://web.dev/baseline" track-type="nav" track-metadata-eventdetail="https://web.dev/baseline" track-metadata-position="nav - docs" track-metadata-module="tertiary nav" track-metadata-module_headline="resources" tooltip > <div class="devsite-nav-item-title"> Baseline </div> </a> </li> <li class="devsite-nav-item"> <a href="https://web.dev" track-type="nav" track-metadata-eventdetail="https://web.dev" track-metadata-position="nav - docs" track-metadata-module="tertiary nav" track-metadata-module_headline="resources" tooltip > <div class="devsite-nav-item-title"> web.dev </div> </a> </li> </ul> </div> </div> </div> </tab> <tab > <a href="https://developer.chrome.com/new" track-metadata-eventdetail="https://developer.chrome.com/new" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - new in chrome" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: New in Chrome" track-name="new in chrome" > New in Chrome </a> </tab> </nav> </devsite-tabs> </div> <devsite-search enable-signin enable-search enable-suggestions enable-query-completion project-name="API" tenant-name="Chrome for Developers" > <form class="devsite-search-form" action="https://developer.chrome.com/s/results" method="GET"> <div class="devsite-search-container"> <button type="button" search-open class="devsite-search-button devsite-header-icon-button button-flat material-icons" aria-label="Open search"></button> <div class="devsite-searchbox"> <input aria-activedescendant="" aria-autocomplete="list" aria-label="Search" aria-expanded="false" aria-haspopup="listbox" autocomplete="off" class="devsite-search-field devsite-search-query" name="q" placeholder="Search" role="combobox" type="text" value="" > <div class="devsite-search-image material-icons" aria-hidden="true"> </div> <div class="devsite-search-shortcut-icon-container" aria-hidden="true"> <kbd class="devsite-search-shortcut-icon">/</kbd> </div> </div> </div> </form> <button type="button" search-close class="devsite-search-button devsite-header-icon-button button-flat material-icons" aria-label="Close search"></button> </devsite-search> </div> <devsite-appearance-selector></devsite-appearance-selector> <devsite-language-selector> <ul role="presentation"> <li role="presentation"> <a role="menuitem" lang="en" >English</a> </li> <li role="presentation"> <a role="menuitem" lang="de" >Deutsch</a> </li> <li role="presentation"> <a role="menuitem" lang="es_419" >Español – América Latina</a> </li> <li role="presentation"> <a role="menuitem" lang="fr" >Français</a> </li> <li role="presentation"> <a role="menuitem" lang="id" >Indonesia</a> </li> <li role="presentation"> <a role="menuitem" lang="it" >Italiano</a> </li> <li role="presentation"> <a role="menuitem" lang="nl" >Nederlands</a> </li> <li role="presentation"> <a role="menuitem" lang="pl" >Polski</a> </li> <li role="presentation"> <a role="menuitem" lang="pt_br" >Português – Brasil</a> </li> <li role="presentation"> <a role="menuitem" lang="vi" >Tiếng Việt</a> </li> <li role="presentation"> <a role="menuitem" lang="tr" >Türkçe</a> </li> <li role="presentation"> <a role="menuitem" lang="ru" >Русский</a> </li> <li role="presentation"> <a role="menuitem" lang="he" >עברית</a> </li> <li role="presentation"> <a role="menuitem" lang="ar" >العربيّة</a> </li> <li role="presentation"> <a role="menuitem" lang="fa" >فارسی</a> </li> <li role="presentation"> <a role="menuitem" lang="hi" >हिंदी</a> </li> <li role="presentation"> <a role="menuitem" lang="bn" >বাংলা</a> </li> <li role="presentation"> <a role="menuitem" lang="th" >ภาษาไทย</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_cn" >中文 – 简体</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_tw" >中文 – 繁體</a> </li> <li role="presentation"> <a role="menuitem" lang="ja" >日本語</a> </li> <li role="presentation"> <a role="menuitem" lang="ko" >한국어</a> </li> </ul> </devsite-language-selector> <devsite-user enable-profiles id="devsite-user"> <span class="button devsite-top-button" aria-hidden="true" visually-hidden>Sign in</span> </devsite-user> </div> </div> </div> <div class="devsite-collapsible-section "> <div class="devsite-header-background"> <div class="devsite-product-id-row" > <div class="devsite-product-description-row"> <ul class="devsite-breadcrumb-list" aria-label="Lower header breadcrumb"> <li class="devsite-breadcrumb-item "> <a href="https://developer.chrome.com/docs/extensions" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Lower Header" data-value="1" track-type="globalNav" track-name="breadcrumb" track-metadata-position="1" track-metadata-eventdetail="Chrome Extensions" > Chrome Extensions </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://developer.chrome.com/docs/extensions/reference" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Lower Header" data-value="2" track-type="globalNav" track-name="breadcrumb" track-metadata-position="2" track-metadata-eventdetail="Reference" > Reference </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://developer.chrome.com/docs/extensions/reference/api" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Lower Header" data-value="3" track-type="globalNav" track-name="breadcrumb" track-metadata-position="3" track-metadata-eventdetail="API" > API </a> </li> </ul> </div> </div> <div class="devsite-doc-set-nav-row"> <devsite-tabs class="lower-tabs"> <nav class="devsite-tabs-wrapper" aria-label="Lower tabs"> <tab > <a href="https://developer.chrome.com/docs/extensions" track-metadata-eventdetail="https://developer.chrome.com/docs/extensions" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - overview" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Overview" track-name="overview" > Overview </a> </tab> <tab > <a href="https://developer.chrome.com/docs/extensions/get-started" track-metadata-eventdetail="https://developer.chrome.com/docs/extensions/get-started" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - get started" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Get Started" track-name="get started" > Get Started </a> </tab> <tab > <a href="https://developer.chrome.com/docs/extensions/develop" track-metadata-eventdetail="https://developer.chrome.com/docs/extensions/develop" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - develop" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Develop" track-name="develop" > Develop </a> </tab> <tab > <a href="https://developer.chrome.com/docs/extensions/how-to" track-metadata-eventdetail="https://developer.chrome.com/docs/extensions/how-to" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - how to" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: How To" track-name="how to" > How To </a> </tab> <tab > <a href="https://developer.chrome.com/docs/extensions/ai" track-metadata-eventdetail="https://developer.chrome.com/docs/extensions/ai" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - ai" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: AI" track-name="ai" > AI </a> </tab> <tab class="devsite-dropdown devsite-active "> <a href="https://developer.chrome.com/docs/extensions/reference" track-metadata-eventdetail="https://developer.chrome.com/docs/extensions/reference" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - reference" track-metadata-module="primary nav" aria-label="Reference, selected" data-category="Site-Wide Custom Events" data-label="Tab: Reference" track-name="reference" > Reference </a> <a href="#" role="button" aria-haspopup="true" aria-expanded="false" aria-label="Dropdown menu for Reference" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs/extensions/reference" track-metadata-position="nav - reference" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Reference" track-name="reference" class="devsite-tabs-dropdown-toggle devsite-icon devsite-icon-arrow-drop-down"></a> <div class="devsite-tabs-dropdown" aria-label="submenu" hidden> <div class="devsite-tabs-dropdown-content"> <div class="devsite-tabs-dropdown-column "> <ul class="devsite-tabs-dropdown-section "> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/docs/extensions/reference/api" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs/extensions/reference/api" track-metadata-position="nav - reference" track-metadata-module="tertiary nav" tooltip > <div class="devsite-nav-item-title"> API </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/docs/extensions/reference/permissions-list" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs/extensions/reference/permissions-list" track-metadata-position="nav - reference" track-metadata-module="tertiary nav" tooltip > <div class="devsite-nav-item-title"> Permissions </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/docs/extensions/reference/manifest" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs/extensions/reference/manifest" track-metadata-position="nav - reference" track-metadata-module="tertiary nav" tooltip > <div class="devsite-nav-item-title"> Manifest </div> </a> </li> </ul> </div> </div> </div> </tab> <tab > <a href="https://developer.chrome.com/docs/extensions/samples" track-metadata-eventdetail="https://developer.chrome.com/docs/extensions/samples" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - samples" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Samples" track-name="samples" > Samples </a> </tab> <tab class="devsite-dropdown "> <a href="https://developer.chrome.com/docs/webstore" track-metadata-eventdetail="https://developer.chrome.com/docs/webstore" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - chrome web store" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Chrome Web Store" track-name="chrome web store" > Chrome Web Store </a> <a href="#" role="button" aria-haspopup="true" aria-expanded="false" aria-label="Dropdown menu for Chrome Web Store" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs/webstore" track-metadata-position="nav - chrome web store" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Chrome Web Store" track-name="chrome web store" class="devsite-tabs-dropdown-toggle devsite-icon devsite-icon-arrow-drop-down"></a> <div class="devsite-tabs-dropdown" aria-label="submenu" hidden> <div class="devsite-tabs-dropdown-content"> <div class="devsite-tabs-dropdown-column "> <ul class="devsite-tabs-dropdown-section "> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/docs/webstore/prepare" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs/webstore/prepare" track-metadata-position="nav - chrome web store" track-metadata-module="tertiary nav" tooltip > <div class="devsite-nav-item-title"> Prepare your Extension </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/docs/webstore/publish" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs/webstore/publish" track-metadata-position="nav - chrome web store" track-metadata-module="tertiary nav" tooltip > <div class="devsite-nav-item-title"> Publish in the Chrome Web Store </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/docs/webstore/program-policies" track-type="nav" track-metadata-eventdetail="https://developer.chrome.com/docs/webstore/program-policies" track-metadata-position="nav - chrome web store" track-metadata-module="tertiary nav" tooltip > <div class="devsite-nav-item-title"> Program Policies </div> </a> </li> </ul> </div> </div> </div> </tab> </nav> </devsite-tabs> </div> </div> </div> </div> </devsite-header> <devsite-book-nav scrollbars > <div class="devsite-book-nav-filter" > <span class="filter-list-icon material-icons" aria-hidden="true"></span> <input type="text" placeholder="Filter" aria-label="Type to filter" role="searchbox"> <span class="filter-clear-button hidden" data-title="Clear filter" aria-label="Clear filter" role="button" tabindex="0"></span> </div> <nav class="devsite-book-nav devsite-nav nocontent" aria-label="Side menu"> <div class="devsite-mobile-header"> <button type="button" id="devsite-close-nav" class="devsite-header-icon-button button-flat material-icons gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Close navigation" aria-label="Close navigation"> </button> <div class="devsite-product-name-wrapper"> <a href="/" class="devsite-site-logo-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Site logo" track-type="globalNav" track-name="chromeForDevelopers" track-metadata-position="nav" track-metadata-eventDetail="nav"> <picture> <source srcset="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/chrome/images/lockup-dark-theme.svg" media="(prefers-color-scheme: dark)" class="devsite-dark-theme" alt="Chrome for Developers"> <img src="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/chrome/images/lockup.svg" class="devsite-site-logo" alt="Chrome for Developers"> </picture> </a> <span class="devsite-product-name"> <ul class="devsite-breadcrumb-list" > <li class="devsite-breadcrumb-item "> </li> </ul> </span> </div> </div> <div class="devsite-book-nav-wrapper"> <div class="devsite-mobile-nav-top"> <ul class="devsite-nav-list"> <li class="devsite-nav-item"> <a href="/case-studies" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Get inspired" track-name="get inspired" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Get inspired" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Get inspired </span> </a> </li> <li class="devsite-nav-item"> <a href="/blog" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Blog" track-name="blog" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Blog" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Blog </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs" class="devsite-nav-title gc-analytics-event devsite-nav-active" data-category="Site-Wide Custom Events" data-label="Tab: Docs" track-name="docs" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Docs" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Docs </span> </a> <ul class="devsite-nav-responsive-tabs devsite-nav-has-menu "> <li class="devsite-nav-item"> <span class="devsite-nav-title" tooltip data-category="Site-Wide Custom Events" data-label="Tab: Docs" track-name="docs" > <span class="devsite-nav-text" tooltip menu="Docs"> More </span> <span class="devsite-nav-icon material-icons" data-icon="forward" menu="Docs"> </span> </span> </li> </ul> <ul class="devsite-nav-responsive-tabs"> <li class="devsite-nav-item"> <a href="/docs/extensions" class="devsite-nav-title gc-analytics-event devsite-nav-has-children " data-category="Site-Wide Custom Events" data-label="Tab: Overview" track-name="overview" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Overview" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Overview </span> <span class="devsite-nav-icon material-icons" data-icon="forward" > </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/extensions/get-started" class="devsite-nav-title gc-analytics-event devsite-nav-has-children " data-category="Site-Wide Custom Events" data-label="Tab: Get Started" track-name="get started" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Get Started" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Get Started </span> <span class="devsite-nav-icon material-icons" data-icon="forward" > </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/extensions/develop" class="devsite-nav-title gc-analytics-event devsite-nav-has-children " data-category="Site-Wide Custom Events" data-label="Tab: Develop" track-name="develop" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Develop" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Develop </span> <span class="devsite-nav-icon material-icons" data-icon="forward" > </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/extensions/how-to" class="devsite-nav-title gc-analytics-event devsite-nav-has-children " data-category="Site-Wide Custom Events" data-label="Tab: How To" track-name="how to" data-category="Site-Wide Custom Events" data-label="Responsive Tab: How To" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > How To </span> <span class="devsite-nav-icon material-icons" data-icon="forward" > </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/extensions/ai" class="devsite-nav-title gc-analytics-event devsite-nav-has-children " data-category="Site-Wide Custom Events" data-label="Tab: AI" track-name="ai" data-category="Site-Wide Custom Events" data-label="Responsive Tab: AI" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > AI </span> <span class="devsite-nav-icon material-icons" data-icon="forward" > </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/extensions/reference" class="devsite-nav-title gc-analytics-event devsite-nav-has-children devsite-nav-active" data-category="Site-Wide Custom Events" data-label="Tab: Reference" track-name="reference" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Reference" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip menu="_book"> Reference </span> <span class="devsite-nav-icon material-icons" data-icon="forward" menu="_book"> </span> </a> <ul class="devsite-nav-responsive-tabs devsite-nav-has-menu devsite-lower-tab-item"> <li class="devsite-nav-item"> <span class="devsite-nav-title" tooltip data-category="Site-Wide Custom Events" data-label="Tab: Reference" track-name="reference" > <span class="devsite-nav-text" tooltip menu="Reference"> More </span> <span class="devsite-nav-icon material-icons" data-icon="forward" menu="Reference"> </span> </span> </li> </ul> </li> <li class="devsite-nav-item"> <a href="/docs/extensions/samples" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Samples" track-name="samples" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Samples" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Samples </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/webstore" class="devsite-nav-title gc-analytics-event devsite-nav-has-children " data-category="Site-Wide Custom Events" data-label="Tab: Chrome Web Store" track-name="chrome web store" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Chrome Web Store" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Chrome Web Store </span> <span class="devsite-nav-icon material-icons" data-icon="forward" > </span> </a> <ul class="devsite-nav-responsive-tabs devsite-nav-has-menu devsite-lower-tab-item"> <li class="devsite-nav-item"> <span class="devsite-nav-title" tooltip data-category="Site-Wide Custom Events" data-label="Tab: Chrome Web Store" track-name="chrome web store" > <span class="devsite-nav-text" tooltip menu="Chrome Web Store"> More </span> <span class="devsite-nav-icon material-icons" data-icon="forward" menu="Chrome Web Store"> </span> </span> </li> </ul> </li> </ul> </li> <li class="devsite-nav-item"> <a href="/new" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: New in Chrome" track-name="new in chrome" data-category="Site-Wide Custom Events" data-label="Responsive Tab: New in Chrome" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > New in Chrome </span> </a> </li> </ul> </div> <div class="devsite-mobile-nav-bottom"> <ul class="devsite-nav-list" menu="_book"> <li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"> <span class="devsite-nav-text" tooltip>Manifest V3</span> </div></li> <li class="devsite-nav-item devsite-nav-deprecated"><a href="/docs/extensions/mv2/reference" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/mv2/reference" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/mv2/reference" ><span class="devsite-nav-text" tooltip>➡ Manifest V2</span><span class="devsite-nav-icon material-icons" data-icon="deprecated" data-title="Deprecated" aria-hidden="true"></span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/accessibilityFeatures" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/accessibilityFeatures" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/accessibilityFeatures" ><span class="devsite-nav-text" tooltip>accessibilityFeatures</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/action" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/action" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/action" ><span class="devsite-nav-text" tooltip>action</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/alarms" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/alarms" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/alarms" ><span class="devsite-nav-text" tooltip>alarms</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/audio" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/audio" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/audio" ><span class="devsite-nav-text" tooltip>audio</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/bookmarks" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/bookmarks" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/bookmarks" ><span class="devsite-nav-text" tooltip>bookmarks</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/browsingData" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/browsingData" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/browsingData" ><span class="devsite-nav-text" tooltip>browsingData</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/certificateProvider" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/certificateProvider" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/certificateProvider" ><span class="devsite-nav-text" tooltip>certificateProvider</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/commands" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/commands" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/commands" ><span class="devsite-nav-text" tooltip>commands</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/contentSettings" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/contentSettings" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/contentSettings" ><span class="devsite-nav-text" tooltip>contentSettings</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/contextMenus" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/contextMenus" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/contextMenus" ><span class="devsite-nav-text" tooltip>contextMenus</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/cookies" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/cookies" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/cookies" ><span class="devsite-nav-text" tooltip>cookies</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/debugger" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/debugger" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/debugger" ><span class="devsite-nav-text" tooltip>debugger</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/declarativeContent" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/declarativeContent" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/declarativeContent" ><span class="devsite-nav-text" tooltip>declarativeContent</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/declarativeNetRequest" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/declarativeNetRequest" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/declarativeNetRequest" ><span class="devsite-nav-text" tooltip>declarativeNetRequest</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/desktopCapture" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/desktopCapture" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/desktopCapture" ><span class="devsite-nav-text" tooltip>desktopCapture</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/devtools/inspectedWindow" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/devtools/inspectedWindow" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/devtools/inspectedWindow" ><span class="devsite-nav-text" tooltip>devtools.inspectedWindow</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/devtools/network" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/devtools/network" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/devtools/network" ><span class="devsite-nav-text" tooltip>devtools.network</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/devtools/panels" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/devtools/panels" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/devtools/panels" ><span class="devsite-nav-text" tooltip>devtools.panels</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/devtools/performance" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/devtools/performance" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/devtools/performance" ><span class="devsite-nav-text" tooltip>devtools.performance</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/devtools/recorder" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/devtools/recorder" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/devtools/recorder" ><span class="devsite-nav-text" tooltip>devtools.recorder</span></a></li> <li class="devsite-nav-item devsite-nav-nightly"><a href="/docs/extensions/reference/api/dns" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/dns" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/dns" ><span class="devsite-nav-text" tooltip>dns</span><span class="devsite-nav-icon material-icons" data-icon="nightly" data-title="Nightly build only" aria-hidden="true"></span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/documentScan" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/documentScan" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/documentScan" ><span class="devsite-nav-text" tooltip>documentScan</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/dom" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/dom" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/dom" ><span class="devsite-nav-text" tooltip>dom</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/downloads" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/downloads" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/downloads" ><span class="devsite-nav-text" tooltip>downloads</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/enterprise/deviceAttributes" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/enterprise/deviceAttributes" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/enterprise/deviceAttributes" ><span class="devsite-nav-text" tooltip>enterprise.deviceAttributes</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/enterprise/hardwarePlatform" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/enterprise/hardwarePlatform" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/enterprise/hardwarePlatform" ><span class="devsite-nav-text" tooltip>enterprise.hardwarePlatform</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/enterprise/networkingAttributes" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/enterprise/networkingAttributes" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/enterprise/networkingAttributes" ><span class="devsite-nav-text" tooltip>enterprise.networkingAttributes</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/enterprise/platformKeys" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/enterprise/platformKeys" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/enterprise/platformKeys" ><span class="devsite-nav-text" tooltip>enterprise.platformKeys</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/events" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/events" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/events" ><span class="devsite-nav-text" tooltip>events</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/extension" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/extension" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/extension" ><span class="devsite-nav-text" tooltip>extension</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/extensionTypes" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/extensionTypes" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/extensionTypes" ><span class="devsite-nav-text" tooltip>extensionTypes</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/fileBrowserHandler" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/fileBrowserHandler" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/fileBrowserHandler" ><span class="devsite-nav-text" tooltip>fileBrowserHandler</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/fileSystemProvider" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/fileSystemProvider" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/fileSystemProvider" ><span class="devsite-nav-text" tooltip>fileSystemProvider</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/fontSettings" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/fontSettings" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/fontSettings" ><span class="devsite-nav-text" tooltip>fontSettings</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/gcm" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/gcm" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/gcm" ><span class="devsite-nav-text" tooltip>gcm</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/history" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/history" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/history" ><span class="devsite-nav-text" tooltip>history</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/i18n" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/i18n" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/i18n" ><span class="devsite-nav-text" tooltip>i18n</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/identity" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/identity" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/identity" ><span class="devsite-nav-text" tooltip>identity</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/idle" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/idle" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/idle" ><span class="devsite-nav-text" tooltip>idle</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/input/ime" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/input/ime" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/input/ime" ><span class="devsite-nav-text" tooltip>input.ime</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/instanceID" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/instanceID" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/instanceID" ><span class="devsite-nav-text" tooltip>instanceID</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/loginState" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/loginState" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/loginState" ><span class="devsite-nav-text" tooltip>loginState</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/management" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/management" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/management" ><span class="devsite-nav-text" tooltip>management</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/notifications" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/notifications" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/notifications" ><span class="devsite-nav-text" tooltip>notifications</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/offscreen" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/offscreen" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/offscreen" ><span class="devsite-nav-text" tooltip>offscreen</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/omnibox" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/omnibox" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/omnibox" ><span class="devsite-nav-text" tooltip>omnibox</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/pageCapture" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/pageCapture" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/pageCapture" ><span class="devsite-nav-text" tooltip>pageCapture</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/permissions" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/permissions" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/permissions" ><span class="devsite-nav-text" tooltip>permissions</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/platformKeys" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/platformKeys" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/platformKeys" ><span class="devsite-nav-text" tooltip>platformKeys</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/power" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/power" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/power" ><span class="devsite-nav-text" tooltip>power</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/printerProvider" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/printerProvider" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/printerProvider" ><span class="devsite-nav-text" tooltip>printerProvider</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/printing" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/printing" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/printing" ><span class="devsite-nav-text" tooltip>printing</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/printingMetrics" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/printingMetrics" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/printingMetrics" ><span class="devsite-nav-text" tooltip>printingMetrics</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/privacy" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/privacy" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/privacy" ><span class="devsite-nav-text" tooltip>privacy</span></a></li> <li class="devsite-nav-item devsite-nav-nightly"><a href="/docs/extensions/reference/api/processes" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/processes" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/processes" ><span class="devsite-nav-text" tooltip>processes</span><span class="devsite-nav-icon material-icons" data-icon="nightly" data-title="Nightly build only" aria-hidden="true"></span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/proxy" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/proxy" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/proxy" ><span class="devsite-nav-text" tooltip>proxy</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/readingList" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/readingList" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/readingList" ><span class="devsite-nav-text" tooltip>readingList</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/runtime" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/runtime" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/runtime" ><span class="devsite-nav-text" tooltip>runtime</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/scripting" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/scripting" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/scripting" ><span class="devsite-nav-text" tooltip>scripting</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/search" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/search" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/search" ><span class="devsite-nav-text" tooltip>search</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/sessions" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/sessions" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/sessions" ><span class="devsite-nav-text" tooltip>sessions</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/sidePanel" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/sidePanel" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/sidePanel" ><span class="devsite-nav-text" tooltip>sidePanel</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/storage" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/storage" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/storage" ><span class="devsite-nav-text" tooltip>storage</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/system/cpu" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/system/cpu" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/system/cpu" ><span class="devsite-nav-text" tooltip>system.cpu</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/system/display" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/system/display" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/system/display" ><span class="devsite-nav-text" tooltip>system.display</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/system/memory" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/system/memory" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/system/memory" ><span class="devsite-nav-text" tooltip>system.memory</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/system/storage" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/system/storage" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/system/storage" ><span class="devsite-nav-text" tooltip>system.storage</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/systemLog" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/systemLog" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/systemLog" ><span class="devsite-nav-text" tooltip>systemLog</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/tabCapture" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/tabCapture" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/tabCapture" ><span class="devsite-nav-text" tooltip>tabCapture</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/tabGroups" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/tabGroups" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/tabGroups" ><span class="devsite-nav-text" tooltip>tabGroups</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/tabs" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/tabs" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/tabs" ><span class="devsite-nav-text" tooltip>tabs</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/topSites" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/topSites" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/topSites" ><span class="devsite-nav-text" tooltip>topSites</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/tts" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/tts" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/tts" ><span class="devsite-nav-text" tooltip>tts</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/ttsEngine" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/ttsEngine" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/ttsEngine" ><span class="devsite-nav-text" tooltip>ttsEngine</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/types" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/types" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/types" ><span class="devsite-nav-text" tooltip>types</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/userScripts" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/userScripts" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/userScripts" ><span class="devsite-nav-text" tooltip>userScripts</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/vpnProvider" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/vpnProvider" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/vpnProvider" ><span class="devsite-nav-text" tooltip>vpnProvider</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/wallpaper" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/wallpaper" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/wallpaper" ><span class="devsite-nav-text" tooltip>wallpaper</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/webAuthenticationProxy" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/webAuthenticationProxy" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/webAuthenticationProxy" ><span class="devsite-nav-text" tooltip>webAuthenticationProxy</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/webNavigation" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/webNavigation" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/webNavigation" ><span class="devsite-nav-text" tooltip>webNavigation</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/webRequest" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/webRequest" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/webRequest" ><span class="devsite-nav-text" tooltip>webRequest</span></a></li> <li class="devsite-nav-item"><a href="/docs/extensions/reference/api/windows" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /docs/extensions/reference/api/windows" track-type="bookNav" track-name="click" track-metadata-eventdetail="/docs/extensions/reference/api/windows" ><span class="devsite-nav-text" tooltip>windows</span></a></li> </ul> <ul class="devsite-nav-list" menu="Docs" aria-label="Side menu" hidden> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Build with Chrome </span> </span> </li> <li class="devsite-nav-item"> <a href="/docs/web-platform" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Web Platform" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Web Platform </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/capabilities" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Capabilities" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Capabilities </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/chromedriver" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: ChromeDriver" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > ChromeDriver </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/extensions" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Extensions" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Extensions </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/webstore" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Chrome Web Store" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Chrome Web Store </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/chromium" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Chromium" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Chromium </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/aurora" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Aurora" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Aurora </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/android" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Web on Android" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Web on Android </span> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.chrome.com/origintrials/" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Origin trials" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Origin trials </span> </a> </li> <li class="devsite-nav-item"> <a href="/release-notes" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Release notes" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Release notes </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Productivity </span> </span> </li> <li class="devsite-nav-item"> <a href="/docs/devtools" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: DevTools" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > DevTools </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/lighthouse" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Lighthouse" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Lighthouse </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/crux" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Chrome UX Report" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Chrome UX Report </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/accessibility" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Accessibility" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Accessibility </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/workbox" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Workbox" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Workbox </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/puppeteer" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Puppeteer" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Puppeteer </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Experience </span> </span> </li> <li class="devsite-nav-item"> <a href="/docs/ai" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: AI" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > AI </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/performance" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Performance" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Performance </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/css-ui" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: CSS and UI" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > CSS and UI </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/identity" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Identity" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Identity </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/payments" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Payments" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Payments </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/privacy-security" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Privacy and security" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Privacy and security </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Resources </span> </span> </li> <li class="devsite-nav-item"> <a href="/docs" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: All documentation" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > All documentation </span> </a> </li> <li class="devsite-nav-item"> <a href="https://web.dev/baseline" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Baseline" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Baseline </span> </a> </li> <li class="devsite-nav-item"> <a href="https://web.dev" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: web.dev" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > web.dev </span> </a> </li> </ul> <ul class="devsite-nav-list" menu="Reference" aria-label="Side menu" hidden> <li class="devsite-nav-item"> <a href="/docs/extensions/reference/api" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: API" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > API </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/extensions/reference/permissions-list" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Permissions" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Permissions </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/extensions/reference/manifest" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Manifest" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Manifest </span> </a> </li> </ul> <ul class="devsite-nav-list" menu="Chrome Web Store" aria-label="Side menu" hidden> <li class="devsite-nav-item"> <a href="/docs/webstore/prepare" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Prepare your Extension" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Prepare your Extension </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/webstore/publish" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Publish in the Chrome Web Store" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Publish in the Chrome Web Store </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/webstore/program-policies" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Program Policies" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Program Policies </span> </a> </li> </ul> </div> </div> </nav> </devsite-book-nav> <section id="gc-wrapper"> <main role="main" class="devsite-main-content" has-book-nav has-sidebar > <div class="devsite-sidebar"> <div class="devsite-sidebar-content"> <devsite-toc class="devsite-nav" role="navigation" aria-label="On this page" depth="2" scrollbars ></devsite-toc> <devsite-recommendations-sidebar class="nocontent devsite-nav"> </devsite-recommendations-sidebar> </div> </div> <devsite-content> <article class="devsite-article"> <div class="devsite-article-meta nocontent" role="navigation"> <ul class="devsite-breadcrumb-list" aria-label="Breadcrumb"> <li class="devsite-breadcrumb-item "> <a href="https://developer.chrome.com/" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="1" track-type="globalNav" track-name="breadcrumb" track-metadata-position="1" track-metadata-eventdetail="" > Home </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://developer.chrome.com/docs" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="2" track-type="globalNav" track-name="breadcrumb" track-metadata-position="2" track-metadata-eventdetail="Docs" > Docs </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://developer.chrome.com/docs/extensions" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="3" track-type="globalNav" track-name="breadcrumb" track-metadata-position="3" track-metadata-eventdetail="Chrome Extensions" > Chrome Extensions </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://developer.chrome.com/docs/extensions/reference" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="4" track-type="globalNav" track-name="breadcrumb" track-metadata-position="4" track-metadata-eventdetail="Reference" > Reference </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://developer.chrome.com/docs/extensions/reference/api" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="5" track-type="globalNav" track-name="breadcrumb" track-metadata-position="5" track-metadata-eventdetail="API" > API </a> </li> </ul> <devsite-thumb-rating position="header"> </devsite-thumb-rating> </div> <h1 class="devsite-page-title" tabindex="-1"> chrome.scripting </h1> <devsite-feature-tooltip ack-key="AckCollectionsBookmarkTooltipDismiss" analytics-category="Site-Wide Custom Events" analytics-action-show="Callout Profile displayed" analytics-action-close="Callout Profile dismissed" analytics-label="Create Collection Callout" class="devsite-page-bookmark-tooltip nocontent" dismiss-button="true" id="devsite-collections-dropdown" dismiss-button-text="Dismiss" close-button-text="Got it"> <devsite-bookmark></devsite-bookmark> <span slot="popout-heading"> Stay organized with collections </span> <span slot="popout-contents"> Save and categorize content based on your preferences. </span> </devsite-feature-tooltip> <div class="devsite-page-title-meta"><devsite-view-release-notes></devsite-view-release-notes></div> <devsite-toc class="devsite-nav" depth="2" devsite-toc-embedded > </devsite-toc> <div class="devsite-article-body clearfix "> <style>.dcc-reference{--color-hairline: #dadce0;--color-blue-lightest: rgba(232, 240, 254, 0.4);--color-blue-lighter: #d2e3fc;--color-blue-medium: #1967d2;--color-blue-darkest: #174ea6;--rgb-blue-darkest: 23, 78, 166;--color-yellow-lightest: rgba(254, 247, 224, 0.3);--color-yellow-lighter: #feefc3;--color-yellow-medium: #f29900;--color-yellow-darkest: #de7100;--rgb-yellow-darkest: 227, 117, 0;--color-red-lightest: rgba(252, 232, 230, 0.4);--color-red-lighter: rgba(252, 232, 230, 0.5);--color-red-medium: #c5221f;--color-red-darkest: #9f0e0e;--rgb-red-darkest: 165, 14, 14;--color-green-lightest: rgba(230, 244, 234, 0.4);--color-green-lighter: #ceead6;--color-green-medium: #188038;--color-green-darkest: #0d652d;--rgb-green-darkest: 13, 101, 45;--color-purple-lightest: rgba(243, 232, 253, 0.4);--color-purple-lighter: rgba(243, 232, 253, 0.5);--color-purple-medium: #8430ce;--color-purple-darkest: #681da8;--rgb-purple-darkest: 104, 29, 168;--color-pink-lightest: rgba(253, 231, 243, 0.4);--color-pink-lighter: rgba(253, 231, 243, 0.5);--color-pink-medium: #d01884;--color-pink-darkest: #9c166b;--rgb-pink-darkest: 156, 22, 107}.dcc-type--label{font-weight:500;font-size:.75rem;line-height:1.3333333333}.dcc-type--xsmall{font-size:.75rem;line-height:1.6666666667}h2.dcc-api-title{display:none}.dcc-code-sections ul{padding-left:0}.dcc-code-sections .dcc-code-sections{border:1px solid var(--color-hairline);padding:calc(1rem - 1px)}.dcc-code-sections .dcc-code-sections ul>li:first-child{border-top:0;padding-top:0}.dcc-code-sections .dcc-code-sections devsite-code{margin-left:calc(-1rem + 1px);margin-right:calc(-1rem + 1px)}.dcc-code-sections .dcc-type--small{font-size:.875em;line-height:2em}.dcc-code-sections__label{font-size:.875rem;line-height:2}.dcc-code-sections__type>:not(:last-child){margin-right:.5ch}.dcc-code-sections__enum{margin-bottom:1rem}.dcc-code-sections__icon::before{background:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuNzc2MzkgMS41NTI3OUM3LjkxNzE2IDEuNDgyNCA4LjA4Mjg0IDEuNDgyNCA4LjIyMzYxIDEuNTUyNzlMMTQuMjIzNiA0LjU1Mjc5QzE0LjM5MyA0LjYzNzQ4IDE0LjUgNC44MTA2MSAxNC41IDVWMTFDMTQuNSAxMS4xODk0IDE0LjM5MyAxMS4zNjI1IDE0LjIyMzYgMTEuNDQ3Mkw4LjIyMzYxIDE0LjQ0NzJDOC4wODI4NCAxNC41MTc2IDcuOTE3MTYgMTQuNTE3NiA3Ljc3NjM5IDE0LjQ0NzJMMS43NzYzOSAxMS40NDcyQzEuNjA3IDExLjM2MjUgMS41IDExLjE4OTQgMS41IDExVjVDMS41IDQuODEwNjEgMS42MDcgNC42Mzc0OCAxLjc3NjM5IDQuNTUyNzlMNy43NzYzOSAxLjU1Mjc5Wk0yLjUgNS44MDkwMlYxMC42OTFMNy41IDEzLjE5MVY4LjMwOTAyTDIuNSA1LjgwOTAyWk04LjUgOC4zMDkwMlYxMy4xOTFMMTMuNSAxMC42OTFWNS44MDkwMkw4LjUgOC4zMDkwMlpNMTIuODgyIDVMOCA3LjQ0MDk4TDMuMTE4MDMgNUw4IDIuNTU5MDJMMTIuODgyIDVaIiBmaWxsPSIjNUY2MzY4Ii8+Cjwvc3ZnPgo=") center/contain no-repeat;content:"";display:inline-block;height:1.25em;margin-right:.5ch;vertical-align:middle;width:1.25em}.dcc-code-sections__icon.dcc-code-sections__icon--number::before{background-image:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNNiAyLjVINFY0LjVINlYyLjVaIiBmaWxsPSIjNUY2MzY4Ii8+CjxwYXRoIGQ9Ik02IDUuNUg0VjcuNUg2VjUuNVoiIGZpbGw9IiM1RjYzNjgiLz4KPHBhdGggZD0iTTQgOC41SDZWMTAuNUg0VjguNVoiIGZpbGw9IiM1RjYzNjgiLz4KPHBhdGggZD0iTTkgMi41SDdWNC41SDlWMi41WiIgZmlsbD0iIzVGNjM2OCIvPgo8cGF0aCBkPSJNNyA1LjVIOVY3LjVIN1Y1LjVaIiBmaWxsPSIjNUY2MzY4Ii8+CjxwYXRoIGQ9Ik05IDguNUg3VjEwLjVIOVY4LjVaIiBmaWxsPSIjNUY2MzY4Ii8+CjxwYXRoIGQ9Ik03IDExLjVIOVYxMy41SDdWMTEuNVoiIGZpbGw9IiM1RjYzNjgiLz4KPHBhdGggZD0iTTEyIDIuNUgxMFY0LjVIMTJWMi41WiIgZmlsbD0iIzVGNjM2OCIvPgo8cGF0aCBkPSJNMTAgNS41SDEyVjcuNUgxMFY1LjVaIiBmaWxsPSIjNUY2MzY4Ii8+CjxwYXRoIGQ9Ik0xMiA4LjVIMTBWMTAuNUgxMlY4LjVaIiBmaWxsPSIjNUY2MzY4Ii8+Cjwvc3ZnPgo=")}.dcc-code-sections__icon.dcc-code-sections__icon--string::before{background-image:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNNC43MTQyOSAxMkg1Ljg1NzE0TDcuMjg1NzEgOC4yODU3MVY0LjVDNy4yODU3MSA0LjIyMzg2IDcuMDYxODYgNCA2Ljc4NTcxIDRIMy41QzMuMjIzODYgNCAzIDQuMjIzODYgMyA0LjVWNy43ODU3MUMzIDguMDYxODYgMy4yMjM4NiA4LjI4NTcxIDMuNSA4LjI4NTcxSDYuMTQyODZMNC43MTQyOSAxMlpNMTAuNDI4NiAxMkgxMS41NzE0TDEzIDguMjg1NzFWNC41QzEzIDQuMjIzODYgMTIuNzc2MSA0IDEyLjUgNEg5LjIxNDI5QzguOTM4MTQgNCA4LjcxNDI5IDQuMjIzODYgOC43MTQyOSA0LjVWNy43ODU3MUM4LjcxNDI5IDguMDYxODYgOC45MzgxNCA4LjI4NTcxIDkuMjE0MjkgOC4yODU3MUgxMS44NTcxTDEwLjQyODYgMTJaIiBmaWxsPSIjNUY2MzY4Ii8+Cjwvc3ZnPgo=")}.dcc-code-sections__icon.dcc-code-sections__icon--boolean::before{background-image:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNMTIuMzUzNiA1Ljg1MzU1TDExLjY0NjQgNS4xNDY0NUw3IDkuNzkyODlMNC44NTM1NSA3LjY0NjQ1TDQuMTQ2NDUgOC4zNTM1NUw3IDExLjIwNzFMMTIuMzUzNiA1Ljg1MzU1WiIgZmlsbD0iIzVGNjM2OCIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTIgM0MyIDIuNDQ3NzIgMi40NDc3MiAyIDMgMkgxM0MxMy41NTIzIDIgMTQgMi40NDc3MiAxNCAzVjEzQzE0IDEzLjU1MjMgMTMuNTUyMyAxNCAxMyAxNEgzQzIuNDQ3NzIgMTQgMiAxMy41NTIzIDIgMTNWM1pNMyAzSDEzVjEzSDNMMyAzWiIgZmlsbD0iIzVGNjM2OCIvPgo8L3N2Zz4K")}.dcc-code-sections__icon.dcc-code-sections__icon--function::before{background-image:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTMuNSA0QzMuNSAyLjYxOTI5IDQuNjE5MjkgMS41IDYgMS41SDYuNVYyLjVINkM1LjE3MTU3IDIuNSA0LjUgMy4xNzE1NyA0LjUgNFY1Ljc2MzkzQzQuNSA2LjcxMDg2IDMuOTY0OTkgNy41NzY1MiAzLjExODAzIDhDMy45NjQ5OSA4LjQyMzQ4IDQuNSA5LjI4OTE0IDQuNSAxMC4yMzYxVjEyQzQuNSAxMi44Mjg0IDUuMTcxNTcgMTMuNSA2IDEzLjVINi41VjE0LjVINkM0LjYxOTI5IDE0LjUgMy41IDEzLjM4MDcgMy41IDEyVjEwLjIzNjFDMy41IDkuNjY3OTEgMy4xNzkgOS4xNDg1MiAyLjY3MDgyIDguODk0NDNMMS43NzYzOSA4LjQ0NzIxQzEuNjA3IDguMzYyNTIgMS41IDguMTg5MzkgMS41IDhDMS41IDcuODEwNjEgMS42MDcgNy42Mzc0OCAxLjc3NjM5IDcuNTUyNzlMMi42NzA4MiA3LjEwNTU3QzMuMTc5IDYuODUxNDggMy41IDYuMzMyMDkgMy41IDUuNzYzOTNWNFpNMTAgMi41SDkuNVYxLjVIMTBDMTEuMzgwNyAxLjUgMTIuNSAyLjYxOTI5IDEyLjUgNFY1Ljc2MzkzQzEyLjUgNi4zMzIwOSAxMi44MjEgNi44NTE0OCAxMy4zMjkyIDcuMTA1NTdMMTQuMjIzNiA3LjU1Mjc5QzE0LjM5MyA3LjYzNzQ4IDE0LjUgNy44MTA2MSAxNC41IDhDMTQuNSA4LjE4OTM5IDE0LjM5MyA4LjM2MjUyIDE0LjIyMzYgOC40NDcyMUwxMy4zMjkyIDguODk0NDNDMTIuODIxIDkuMTQ4NTIgMTIuNSA5LjY2NzkxIDEyLjUgMTAuMjM2MVYxMkMxMi41IDEzLjM4MDcgMTEuMzgwNyAxNC41IDEwIDE0LjVIOS41VjEzLjVIMTBDMTAuODI4NCAxMy41IDExLjUgMTIuODI4NCAxMS41IDEyVjEwLjIzNjFDMTEuNSA5LjI4OTE0IDEyLjAzNSA4LjQyMzQ4IDEyLjg4MiA4QzEyLjAzNSA3LjU3NjUyIDExLjUgNi43MTA4NiAxMS41IDUuNzYzOTNWNEMxMS41IDMuMTcxNTcgMTAuODI4NCAyLjUgMTAgMi41WiIgZmlsbD0iIzVGNjM2OCIvPgo8L3N2Zz4K")}.dcc-code-sections__icon.dcc-code-sections__icon--array::before{background-image:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEyIDYuNUg0VjkuNUgxMlY2LjVaTTEyIDUuNUg0VjNIMTJWNS41Wk0xMyAzQzEzIDIuNDQ3NzIgMTIuNTUyMyAyIDEyIDJINEMzLjQ0NzcyIDIgMyAyLjQ0NzcyIDMgM1YxM0MzIDEzLjU1MjMgMy40NDc3MiAxNCA0IDE0SDEyQzEyLjU1MjMgMTQgMTMgMTMuNTUyMyAxMyAxM1YzWk0xMiAxMC41SDRWMTNIMTJWMTAuNVoiIGZpbGw9IiM1RjYzNjgiLz4KPC9zdmc+Cg==")}.dcc-code-sections__icon.dcc-code-sections__icon--reference::before{background-image:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNMyAySDhWM0gzTDMgMTNIMTNWOEgxNFYxM0MxNCAxMy41NTIzIDEzLjU1MjMgMTQgMTMgMTRIM0MyLjQ0NzcyIDE0IDIgMTMuNTUyMyAyIDEzVjNDMiAyLjQ0NzcyIDIuNDQ3NzIgMiAzIDJaIiBmaWxsPSIjNUY2MzY4Ii8+CjxwYXRoIGQ9Ik05LjUgM0gxMi4yOTI5TDUuNjQ2NDUgOS42NDY0NUw2LjM1MzU1IDEwLjM1MzZMMTMgMy43MDcxMVY2LjVIMTRWMkg5LjVWM1oiIGZpbGw9IiM1RjYzNjgiLz4KPC9zdmc+Cg==")}.dcc-code-sections__optional{color:var(--color-pink-medium)}.dcc-code-sections__value{color:var(--color-code-number)}.dcc-code-sections__deprecated{color:var(--color-red-medium)}.dcc-code-sections__callback{display:block}p>.dcc-code-sections__callback{margin-top:.5em}.dcc-code-sections__overline{border-top:1px solid var(--color-hairline);margin:1em 0;padding-top:get-size(300)}.dcc-code-sections__mode{color:var(--color-code-comment);text-transform:uppercase}.dcc-code-sections li{border-top:1px solid var(--color-hairline);display:flex;flex-direction:column;padding-top:get-size(300);position:relative}.dcc-code-sections li>:first-child{font-weight:500;flex:0 0 auto;flex-shrink:1;min-width:9rem;padding-right:1rem}.dcc-code-sections li>:not(:first-child){flex-grow:1}.dcc-code-sections--summary{padding-left:0}.dcc-code-sections--summary>li:first-child{border-top:0;padding-top:0}@media(min-width: 992px){.dcc-code-sections--summary>li{flex-direction:row}}.dcc-code-sections--summary>li>:first-child{min-width:6.5rem}.dcc-tag-pill{--flow-space: 0.25rem;box-sizing:border-box;border-radius:.75rem;font-weight:500;font-size:.75rem;line-height:1.3333333333;margin:calc(var(--flow-space)/2);background-color:var(--color-blue-lightest);color:var(--color-blue-darkest);margin-bottom:.5rem;padding:.25rem .75rem;cursor:help}.dcc-tag-pill--blue{background-color:var(--color-blue-lightest);color:var(--color-blue-darkest)}.dcc-tag-pill--yellow{background-color:var(--color-yellow-lightest);color:var(--color-yellow-darkest)}.dcc-tag-pill--red{background-color:var(--color-red-lightest);color:var(--color-red-darkest)}.dcc-tag-pill--green{background-color:var(--color-green-lightest);color:var(--color-green-darkest)}.dcc-tag-pill--pink{background-color:var(--color-pink-lightest);color:var(--color-pink-darkest)}.dcc-tag-pill--purple{background-color:var(--color-purple-lightest);color:var(--color-purple-darkest)}a>.dcc-tag-pill{cursor:pointer}</style> <p></p> <p><h2 class="dcc-api-title" data-text="Description" id="description" tabindex="-1">Description</h2> <div class="dcc-reference"><p>Use the <code translate="no" dir="ltr">chrome.scripting</code> API to execute script in different contexts.</p></div></p> <p><h2 id="permissions" data-text="Permissions" tabindex="-1">Permissions</h2> <div class="dcc-reference"><code translate="no" dir="ltr">scripting</code><br /></div></p> <p><h2 id="availability" data-text="Availability" tabindex="-1">Availability</h2> <div class="dcc-reference"><div class=""> <div><span class="dcc-tag-pill--blue dcc-tag-pill" title="Available from this Chrome version and higher">Chrome 88+ </span><span class="dcc-tag-pill--purple dcc-tag-pill" title="Minimum manifest version">MV3+ </span></div> </div></div></p> <h2 id="manifest" data-text="Manifest" tabindex="-1">Manifest</h2> <p></p> <p>To use the <code translate="no" dir="ltr">chrome.scripting</code> API, declare the <code translate="no" dir="ltr">&quot;scripting&quot;</code> permission in the <a href="/docs/extensions/reference/manifest">manifest</a> plus the host permissions for the pages to inject scripts into. Use the <a href="/docs/extensions/develop/concepts/declare-permissions"><code translate="no" dir="ltr">&quot;host_permissions&quot;</code></a> key or the <a href="/docs/extensions/develop/concepts/activeTab"><code translate="no" dir="ltr">&quot;activeTab&quot;</code></a> permission, which grants temporary host permissions. The following example uses the activeTab permission.</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="JSON"><code translate="no" dir="ltr"><span class="devsite-syntax-p">{</span> <span class="devsite-syntax-err"> </span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nt">"name"</span><span class="devsite-syntax-p">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-s2">"Scripting Extension"</span><span class="devsite-syntax-p">,</span> <span class="devsite-syntax-err"> </span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nt">"manifest_version"</span><span class="devsite-syntax-p">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-mi">3</span><span class="devsite-syntax-p">,</span> <span class="devsite-syntax-err"> </span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nt">"permissions"</span><span class="devsite-syntax-p">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">[</span><span class="devsite-syntax-s2">"scripting"</span><span class="devsite-syntax-p">,</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-s2">"activeTab"</span><span class="devsite-syntax-p">],</span> <span class="devsite-syntax-err"> </span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-err">...</span> <span class="devsite-syntax-p">}</span> </code></pre></devsite-code> <h2 id="concepts_and_usage" data-text="Concepts and usage" tabindex="-1">Concepts and usage</h2> <p>You can use the <code translate="no" dir="ltr">chrome.scripting</code> API to inject JavaScript and CSS into websites. This is similar to what you can do with <a href="/docs/extensions/develop/concepts/content-scripts">content scripts</a>. But by using the <a href="/docs/extensions/reference/scripting"><code translate="no" dir="ltr">chrome.scripting</code></a> namespace, extensions can make decisions at runtime.</p> <h3 id="injection_targets" data-text="Injection targets" tabindex="-1">Injection targets</h3> <p>You can use the <code translate="no" dir="ltr">target</code> parameter to specify a target to inject JavaScript or CSS into.</p> <p>The only required field is <code translate="no" dir="ltr">tabId</code>. By default, an injection will run in the main frame of the specified tab.</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="JavaScript"><code translate="no" dir="ltr"><span class="devsite-syntax-kd">function</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">getTabId</span><span class="devsite-syntax-p">()</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">...</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">}</span> <span class="devsite-syntax-nx">chrome</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">scripting</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">executeScript</span><span class="devsite-syntax-p">({</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">target</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span><span class="devsite-syntax-nx">tabId</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">getTabId</span><span class="devsite-syntax-p">()},</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">files</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">[</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-s2">"script.js"</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">],</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">})</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">then</span><span class="devsite-syntax-p">(()</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">=</span>&gt;<span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">console</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">log</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-s2">"script injected"</span><span class="devsite-syntax-p">));</span> </code></pre></devsite-code> <p>To run in all frames of the specified tab, you can set the <code translate="no" dir="ltr">allFrames</code> boolean to <code translate="no" dir="ltr">true</code>.</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="JavaScript"><code translate="no" dir="ltr"><span class="devsite-syntax-kd">function</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">getTabId</span><span class="devsite-syntax-p">()</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">...</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">}</span> <span class="devsite-syntax-nx">chrome</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">scripting</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">executeScript</span><span class="devsite-syntax-p">({</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">target</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span><span class="devsite-syntax-nx">tabId</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">getTabId</span><span class="devsite-syntax-p">(),</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">allFrames</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-kc">true</span><span class="devsite-syntax-p">},</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">files</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">[</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-s2">"script.js"</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">],</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">})</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">then</span><span class="devsite-syntax-p">(()</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">=</span>&gt;<span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">console</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">log</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-s2">"script injected in all frames"</span><span class="devsite-syntax-p">));</span> </code></pre></devsite-code> <p>You can also inject into specific frames of a tab by specifying individual frame IDs. For more information on frame IDs, see the <a href="/docs/extensions/reference/api/webNavigation"><code translate="no" dir="ltr">chrome.webNavigation</code> API</a>.</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="JavaScript"><code translate="no" dir="ltr"><span class="devsite-syntax-kd">function</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">getTabId</span><span class="devsite-syntax-p">()</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">...</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">}</span> <span class="devsite-syntax-nx">chrome</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">scripting</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">executeScript</span><span class="devsite-syntax-p">({</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">target</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span><span class="devsite-syntax-nx">tabId</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">getTabId</span><span class="devsite-syntax-p">(),</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">frameIds</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">[</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">frameId1</span><span class="devsite-syntax-p">,</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">frameId2</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">]},</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">files</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">[</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-s2">"script.js"</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">],</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">})</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">then</span><span class="devsite-syntax-p">(()</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">=</span>&gt;<span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">console</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">log</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-s2">"script injected on target frames"</span><span class="devsite-syntax-p">));</span> </code></pre></devsite-code> <aside class="note"><b>Note:</b> You cannot specify both the <code translate="no" dir="ltr">"frameIds"</code> and <code translate="no" dir="ltr">"allFrames"</code> properties.</aside> <h3 id="injected_code" data-text="Injected code" tabindex="-1">Injected code</h3> <p>Extensions can specify the code to be injected either via an external file or a runtime variable.</p> <h4 id="files" data-text="Files" tabindex="-1">Files</h4> <p>Files are specified as strings that are paths relative to the extension&#39;s root directory. The following code will inject the file <code translate="no" dir="ltr">script.js</code> into the main frame of the tab.</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="JavaScript"><code translate="no" dir="ltr"><span class="devsite-syntax-kd">function</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">getTabId</span><span class="devsite-syntax-p">()</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">...</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">}</span> <span class="devsite-syntax-nx">chrome</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">scripting</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">executeScript</span><span class="devsite-syntax-p">({</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">target</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span><span class="devsite-syntax-nx">tabId</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">getTabId</span><span class="devsite-syntax-p">()},</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">files</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">[</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-s2">"script.js"</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">],</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">})</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">then</span><span class="devsite-syntax-p">(()</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">=</span>&gt;<span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">console</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">log</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-s2">"injected script file"</span><span class="devsite-syntax-p">));</span> </code></pre></devsite-code> <h4 id="runtime_functions" data-text="Runtime functions" tabindex="-1">Runtime functions</h4> <p>When injecting JavaScript with <code translate="no" dir="ltr">scripting.executeScript()</code>, you can specify a function to be executed instead of a file. This function should be a function variable available to the current extension context.</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="JavaScript"><code translate="no" dir="ltr"><span class="devsite-syntax-kd">function</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">getTabId</span><span class="devsite-syntax-p">()</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">...</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">}</span> <span class="devsite-syntax-kd">function</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">getTitle</span><span class="devsite-syntax-p">()</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-k">return</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nb">document</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">title</span><span class="devsite-syntax-p">;</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">}</span> <span class="devsite-syntax-nx">chrome</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">scripting</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">executeScript</span><span class="devsite-syntax-p">({</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">target</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span><span class="devsite-syntax-nx">tabId</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">getTabId</span><span class="devsite-syntax-p">()},</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">func</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">getTitle</span><span class="devsite-syntax-p">,</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">})</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">then</span><span class="devsite-syntax-p">(()</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">=</span>&gt;<span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">console</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">log</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-s2">"injected a function"</span><span class="devsite-syntax-p">));</span> </code></pre></devsite-code><div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="JavaScript"><code translate="no" dir="ltr"><span class="devsite-syntax-kd">function</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">getTabId</span><span class="devsite-syntax-p">()</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">...</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">}</span> <span class="devsite-syntax-kd">function</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">getUserColor</span><span class="devsite-syntax-p">()</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">...</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">}</span> <span class="devsite-syntax-kd">function</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">changeBackgroundColor</span><span class="devsite-syntax-p">()</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-nb">document</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">body</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">style</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">backgroundColor</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">=</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">getUserColor</span><span class="devsite-syntax-p">();</span> <span class="devsite-syntax-p">}</span> <span class="devsite-syntax-nx">chrome</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">scripting</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">executeScript</span><span class="devsite-syntax-p">({</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">target</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span><span class="devsite-syntax-nx">tabId</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">getTabId</span><span class="devsite-syntax-p">()},</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">func</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">changeBackgroundColor</span><span class="devsite-syntax-p">,</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">})</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">then</span><span class="devsite-syntax-p">(()</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">=</span>&gt;<span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">console</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">log</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-s2">"injected a function"</span><span class="devsite-syntax-p">));</span> </code></pre></devsite-code> <p>You can work around this by using the <code translate="no" dir="ltr">args</code> property:</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="JavaScript"><code translate="no" dir="ltr"><span class="devsite-syntax-kd">function</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">getTabId</span><span class="devsite-syntax-p">()</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">...</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">}</span> <span class="devsite-syntax-kd">function</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">getUserColor</span><span class="devsite-syntax-p">()</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">...</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">}</span> <span class="devsite-syntax-kd">function</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">changeBackgroundColor</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-nx">backgroundColor</span><span class="devsite-syntax-p">)</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-nb">document</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">body</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">style</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">backgroundColor</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">=</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">backgroundColor</span><span class="devsite-syntax-p">;</span> <span class="devsite-syntax-p">}</span> <span class="devsite-syntax-nx">chrome</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">scripting</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">executeScript</span><span class="devsite-syntax-p">({</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">target</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span><span class="devsite-syntax-nx">tabId</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">getTabId</span><span class="devsite-syntax-p">()},</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">func</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">changeBackgroundColor</span><span class="devsite-syntax-p">,</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">args</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">[</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">getUserColor</span><span class="devsite-syntax-p">()</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">],</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">})</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">then</span><span class="devsite-syntax-p">(()</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">=</span>&gt;<span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">console</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">log</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-s2">"injected a function"</span><span class="devsite-syntax-p">));</span> </code></pre></devsite-code> <h4 id="runtime_strings" data-text="Runtime strings" tabindex="-1">Runtime strings</h4> <p>If injecting CSS within a page, you can also specify a string to be used in the <code translate="no" dir="ltr">css</code> property. This option is only available for <code translate="no" dir="ltr">scripting.insertCSS()</code>; you can&#39;t execute a string using <code translate="no" dir="ltr">scripting.executeScript()</code>.</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="JavaScript"><code translate="no" dir="ltr"><span class="devsite-syntax-kd">function</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">getTabId</span><span class="devsite-syntax-p">()</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">...</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">}</span> <span class="devsite-syntax-kd">const</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">css</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">=</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-s2">"body { background-color: red; }"</span><span class="devsite-syntax-p">;</span> <span class="devsite-syntax-nx">chrome</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">scripting</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">insertCSS</span><span class="devsite-syntax-p">({</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">target</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span><span class="devsite-syntax-nx">tabId</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">getTabId</span><span class="devsite-syntax-p">()},</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">css</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">css</span><span class="devsite-syntax-p">,</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">})</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">then</span><span class="devsite-syntax-p">(()</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">=</span>&gt;<span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">console</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">log</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-s2">"CSS injected"</span><span class="devsite-syntax-p">));</span> </code></pre></devsite-code> <h3 id="handle_the_results" data-text="Handle the results" tabindex="-1">Handle the results</h3> <p>The results of executing JavaScript are passed to the extension. A single result is included per-frame. The main frame is guaranteed to be the first index in the resulting array; all other frames are in a non-deterministic order.</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="JavaScript"><code translate="no" dir="ltr"><span class="devsite-syntax-kd">function</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">getTabId</span><span class="devsite-syntax-p">()</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">...</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">}</span> <span class="devsite-syntax-kd">function</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">getTitle</span><span class="devsite-syntax-p">()</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-k">return</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nb">document</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">title</span><span class="devsite-syntax-p">;</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">}</span> <span class="devsite-syntax-nx">chrome</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">scripting</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">executeScript</span><span class="devsite-syntax-p">({</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">target</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span><span class="devsite-syntax-nx">tabId</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">getTabId</span><span class="devsite-syntax-p">(),</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">allFrames</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-kc">true</span><span class="devsite-syntax-p">},</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">func</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">getTitle</span><span class="devsite-syntax-p">,</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">})</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">then</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-nx">injectionResults</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">=</span>&gt;<span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-k">for</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-kd">const</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span><span class="devsite-syntax-nx">frameId</span><span class="devsite-syntax-p">,</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">result</span><span class="devsite-syntax-p">}</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-k">of</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">injectionResults</span><span class="devsite-syntax-p">)</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">console</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">log</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-sb">`Frame </span><span class="devsite-syntax-si">${</span><span class="devsite-syntax-nx">frameId</span><span class="devsite-syntax-si">}</span><span class="devsite-syntax-sb"> result:`</span><span class="devsite-syntax-p">,</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">result</span><span class="devsite-syntax-p">);</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">}</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">});</span> </code></pre></devsite-code> <p><code translate="no" dir="ltr">scripting.insertCSS()</code> does not return any results.</p> <h4 id="promises" data-text="Promises" tabindex="-1">Promises</h4> <p>If the resulting value of the script execution is a promise, Chrome will wait for the promise to settle and return the resulting value.</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="JavaScript"><code translate="no" dir="ltr"><span class="devsite-syntax-kd">function</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">getTabId</span><span class="devsite-syntax-p">()</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">...</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">}</span> <span class="devsite-syntax-k">async</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-kd">function</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">addIframe</span><span class="devsite-syntax-p">()</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-kd">const</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">iframe</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">=</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nb">document</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">createElement</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-s2">"iframe"</span><span class="devsite-syntax-p">);</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-kd">const</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">loadComplete</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">=</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-ow">new</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nb">Promise</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-nx">resolve</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">=</span>&gt;<span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">iframe</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">addEventListener</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-s2">"load"</span><span class="devsite-syntax-p">,</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">resolve</span><span class="devsite-syntax-p">));</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">iframe</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">src</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">=</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-s2">"https://example.com"</span><span class="devsite-syntax-p">;</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-nb">document</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">body</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">appendChild</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-nx">iframe</span><span class="devsite-syntax-p">);</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-k">await</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">loadComplete</span><span class="devsite-syntax-p">;</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-k">return</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">iframe</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">contentWindow</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nb">document</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">title</span><span class="devsite-syntax-p">;</span> <span class="devsite-syntax-p">}</span> <span class="devsite-syntax-nx">chrome</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">scripting</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">executeScript</span><span class="devsite-syntax-p">({</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">target</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span><span class="devsite-syntax-nx">tabId</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">getTabId</span><span class="devsite-syntax-p">(),</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">allFrames</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-kc">true</span><span class="devsite-syntax-p">},</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">func</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">addIframe</span><span class="devsite-syntax-p">,</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">})</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">then</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-nx">injectionResults</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">=</span>&gt;<span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-k">for</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-kd">const</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">frameResult</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-k">of</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">injectionResults</span><span class="devsite-syntax-p">)</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-kd">const</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span><span class="devsite-syntax-nx">frameId</span><span class="devsite-syntax-p">,</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">result</span><span class="devsite-syntax-p">}</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">=</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">frameResult</span><span class="devsite-syntax-p">;</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">console</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">log</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-sb">`Frame </span><span class="devsite-syntax-si">${</span><span class="devsite-syntax-nx">frameId</span><span class="devsite-syntax-si">}</span><span class="devsite-syntax-sb"> result:`</span><span class="devsite-syntax-p">,</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">result</span><span class="devsite-syntax-p">);</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">}</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">});</span> </code></pre></devsite-code> <h2 id="examples" data-text="Examples" tabindex="-1">Examples</h2> <h3 id="unregister_all_dynamic_content_scripts" data-text="Unregister all dynamic content scripts" tabindex="-1">Unregister all dynamic content scripts</h3> <p>The following snippet contains a function that unregisters all dynamic content scripts the extension has previously registered.</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="JavaScript"><code translate="no" dir="ltr"><span class="devsite-syntax-k">async</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-kd">function</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">unregisterAllDynamicContentScripts</span><span class="devsite-syntax-p">()</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-k">try</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-kd">const</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">scripts</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">=</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-k">await</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">chrome</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">scripting</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">getRegisteredContentScripts</span><span class="devsite-syntax-p">();</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-kd">const</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">scriptIds</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">=</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">scripts</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">map</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-nx">script</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">=</span>&gt;<span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">script</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">id</span><span class="devsite-syntax-p">);</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-k">return</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">chrome</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">scripting</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">unregisterContentScripts</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-nx">scriptIds</span><span class="devsite-syntax-p">);</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">}</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-k">catch</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-nx">error</span><span class="devsite-syntax-p">)</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-kd">const</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">message</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">=</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">[</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-s2">"An unexpected error occurred while"</span><span class="devsite-syntax-p">,</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-s2">"unregistering dynamic content scripts."</span><span class="devsite-syntax-p">,</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">].</span><span class="devsite-syntax-nx">join</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-s2">" "</span><span class="devsite-syntax-p">);</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-k">throw</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-ow">new</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-ne">Error</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-nx">message</span><span class="devsite-syntax-p">,</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span><span class="devsite-syntax-nx">cause</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">:</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nx">error</span><span class="devsite-syntax-p">});</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">}</span> <span class="devsite-syntax-p">}</span> </code></pre></devsite-code> <aside class="key-point"><b>Key point:</b> Unregistering content scripts will not remove scripts or styles that have already been injected.</aside> <p>To try the <code translate="no" dir="ltr">chrome.scripting</code> API, install the <a href="https://github.com/GoogleChrome/chrome-extensions-samples/tree/main/api-samples/scripting">scripting sample</a> from the <a href="https://github.com/GoogleChrome/chrome-extensions-samples">Chrome extension samples</a> repository.</p> <p><div class="dcc-reference"><h2 id="type" data-text="Types" tabindex="-1">Types</h2> <div><div> <div class="notranslate"> <h3 id="type-ContentScriptFilter" data-text="ContentScriptFilter" tabindex="-1">ContentScriptFilter</h3> </div><div class=""> <div><span class="dcc-tag-pill--blue dcc-tag-pill" title="Available from this Chrome version and higher">Chrome 96+ </span></div> </div></div><div class="dcc-code-sections"><h4 class="dcc-type--label dcc-code-sections__mode" id="properties" data-text="Properties" tabindex="-1">Properties</h4><ul class="stack"><li class="stack"> <div> <div class="dcc-code-sections__label" id="property-ContentScriptFilter-ids">ids</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--array">string[]&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><p>If specified, <a href="#method-getRegisteredContentScripts"><code translate="no" dir="ltr">getRegisteredContentScripts</code></a> will only return scripts with an id specified in this list.</p> </li></ul> </div><div> <div class="notranslate"> <h3 id="type-CSSInjection" data-text="CSSInjection" tabindex="-1">CSSInjection</h3> </div></div><div class="dcc-code-sections"><h4 class="dcc-type--label dcc-code-sections__mode" id="properties_1" data-text="Properties" tabindex="-1">Properties</h4><ul class="stack"><li class="stack"> <div> <div class="dcc-code-sections__label" id="property-CSSInjection-css">css</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--string">string&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><p>A string containing the CSS to inject. Exactly one of <code translate="no" dir="ltr">files</code> and <code translate="no" dir="ltr">css</code> must be specified.</p> </li><li class="stack"> <div> <div class="dcc-code-sections__label" id="property-CSSInjection-files">files</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--array">string[]&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><p>The path of the CSS files to inject, relative to the extension's root directory. Exactly one of <code translate="no" dir="ltr">files</code> and <code translate="no" dir="ltr">css</code> must be specified.</p> </li><li class="stack"> <div> <div class="dcc-code-sections__label" id="property-CSSInjection-origin">origin</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--object"><a href="#type-StyleOrigin">StyleOrigin</a>&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><p>The style origin for the injection. Defaults to <code translate="no" dir="ltr">'AUTHOR'</code>.</p> </li><li class="stack"> <div> <div class="dcc-code-sections__label" id="property-CSSInjection-target">target</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--object"><a href="#type-InjectionTarget">InjectionTarget</a></p></div> </div><p>Details specifying the target into which to insert the CSS.</p> </li></ul> </div><div> <div class="notranslate"> <h3 id="type-ExecutionWorld" data-text="ExecutionWorld" tabindex="-1">ExecutionWorld</h3> </div><div class=""> <div><span class="dcc-tag-pill--blue dcc-tag-pill" title="Available from this Chrome version and higher">Chrome 95+ </span></div> </div><p>The JavaScript world for a script to execute within.</p> </div><div class="dcc-code-sections"><h4 class="dcc-type--label dcc-code-sections__mode" id="enum" data-text="Enum" tabindex="-1">Enum</h4><div class="dcc-code-sections__overline dcc-code-sections__label"> <p><span style="white-space: nowrap;"><p class="dcc-code-sections__icon dcc-code-sections__icon--stringdcc-code-sections__enum"><span class="dcc-code-sections__value">&quot;ISOLATED&quot;</span> <br> <span class="dcc-type--xsmall" style="white-space: initial">Specifies the isolated world, which is the execution environment unique to this extension.</span></p></span><span style="white-space: nowrap;"><p class="dcc-code-sections__icon dcc-code-sections__icon--stringdcc-code-sections__enum"><span class="dcc-code-sections__value">&quot;MAIN&quot;</span> <br> <span class="dcc-type--xsmall" style="white-space: initial">Specifies the main world of the DOM, which is the execution environment shared with the host page's JavaScript.</span></p></span></p> </div> </div><div> <div class="notranslate"> <h3 id="type-InjectionResult" data-text="InjectionResult" tabindex="-1">InjectionResult</h3> </div></div><div class="dcc-code-sections"><h4 class="dcc-type--label dcc-code-sections__mode" id="properties_2" data-text="Properties" tabindex="-1">Properties</h4><ul class="stack"><li class="stack"> <div> <div class="dcc-code-sections__label" id="property-InjectionResult-documentId">documentId</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--string">string</p></div> </div><div class="pad-top-200"> <div><span class="dcc-tag-pill--blue dcc-tag-pill" title="Available from this Chrome version and higher">Chrome 106+ </span></div> </div><p>The document associated with the injection.</p> </li><li class="stack"> <div> <div class="dcc-code-sections__label" id="property-InjectionResult-frameId">frameId</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--number">number</p></div> </div><div class="pad-top-200"> <div><span class="dcc-tag-pill--blue dcc-tag-pill" title="Available from this Chrome version and higher">Chrome 90+ </span></div> </div><p>The frame associated with the injection.</p> </li><li class="stack"> <div> <div class="dcc-code-sections__label" id="property-InjectionResult-result">result</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--any">any&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><p>The result of the script execution.</p> </li></ul> </div><div> <div class="notranslate"> <h3 id="type-InjectionTarget" data-text="InjectionTarget" tabindex="-1">InjectionTarget</h3> </div></div><div class="dcc-code-sections"><h4 class="dcc-type--label dcc-code-sections__mode" id="properties_3" data-text="Properties" tabindex="-1">Properties</h4><ul class="stack"><li class="stack"> <div> <div class="dcc-code-sections__label" id="property-InjectionTarget-allFrames">allFrames</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--boolean">boolean&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><p>Whether the script should inject into all frames within the tab. Defaults to false. This must not be true if <code translate="no" dir="ltr">frameIds</code> is specified.</p> </li><li class="stack"> <div> <div class="dcc-code-sections__label" id="property-InjectionTarget-documentIds">documentIds</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--array">string[]&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><div class="pad-top-200"> <div><span class="dcc-tag-pill--blue dcc-tag-pill" title="Available from this Chrome version and higher">Chrome 106+ </span></div> </div><p>The <a href="https://developer.chrome.com/docs/extensions/reference/webNavigation/#document_ids">IDs</a> of specific documentIds to inject into. This must not be set if <code translate="no" dir="ltr">frameIds</code> is set.</p> </li><li class="stack"> <div> <div class="dcc-code-sections__label" id="property-InjectionTarget-frameIds">frameIds</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--array">number[]&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><p>The <a href="https://developer.chrome.com/docs/extensions/reference/webNavigation/#frame_ids">IDs</a> of specific frames to inject into.</p> </li><li class="stack"> <div> <div class="dcc-code-sections__label" id="property-InjectionTarget-tabId">tabId</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--number">number</p></div> </div><p>The ID of the tab into which to inject.</p> </li></ul> </div><div> <div class="notranslate"> <h3 id="type-RegisteredContentScript" data-text="RegisteredContentScript" tabindex="-1">RegisteredContentScript</h3> </div><div class=""> <div><span class="dcc-tag-pill--blue dcc-tag-pill" title="Available from this Chrome version and higher">Chrome 96+ </span></div> </div></div><div class="dcc-code-sections"><h4 class="dcc-type--label dcc-code-sections__mode" id="properties_4" data-text="Properties" tabindex="-1">Properties</h4><ul class="stack"><li class="stack"> <div> <div class="dcc-code-sections__label" id="property-RegisteredContentScript-allFrames">allFrames</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--boolean">boolean&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><p>If specified true, it will inject into all frames, even if the frame is not the top-most frame in the tab. Each frame is checked independently for URL requirements; it will not inject into child frames if the URL requirements are not met. Defaults to false, meaning that only the top frame is matched.</p> </li><li class="stack"> <div> <div class="dcc-code-sections__label" id="property-RegisteredContentScript-css">css</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--array">string[]&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><p>The list of CSS files to be injected into matching pages. These are injected in the order they appear in this array, before any DOM is constructed or displayed for the page.</p> </li><li class="stack"> <div> <div class="dcc-code-sections__label" id="property-RegisteredContentScript-excludeMatches">excludeMatches</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--array">string[]&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><p>Excludes pages that this content script would otherwise be injected into. See <a href="https://developer.chrome.com/extensions/develop/concepts/match-patterns">Match Patterns</a> for more details on the syntax of these strings.</p> </li><li class="stack"> <div> <div class="dcc-code-sections__label" id="property-RegisteredContentScript-id">id</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--string">string</p></div> </div><p>The id of the content script, specified in the API call. Must not start with a '_' as it's reserved as a prefix for generated script IDs.</p> </li><li class="stack"> <div> <div class="dcc-code-sections__label" id="property-RegisteredContentScript-js">js</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--array">string[]&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><p>The list of JavaScript files to be injected into matching pages. These are injected in the order they appear in this array.</p> </li><li class="stack"> <div> <div class="dcc-code-sections__label" id="property-RegisteredContentScript-matchOriginAsFallback">matchOriginAsFallback</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--boolean">boolean&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><div class="pad-top-200"> <div><span class="dcc-tag-pill--blue dcc-tag-pill" title="Available from this Chrome version and higher">Chrome 119+ </span></div> </div><p>Indicates whether the script can be injected into frames where the URL contains an unsupported scheme; specifically: about:, data:, blob:, or filesystem:. In these cases, the URL's origin is checked to determine if the script should be injected. If the origin is <code translate="no" dir="ltr">null</code> (as is the case for data: URLs) then the used origin is either the frame that created the current frame or the frame that initiated the navigation to this frame. Note that this may not be the parent frame.</p> </li><li class="stack"> <div> <div class="dcc-code-sections__label" id="property-RegisteredContentScript-matches">matches</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--array">string[]&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><p>Specifies which pages this content script will be injected into. See <a href="https://developer.chrome.com/extensions/develop/concepts/match-patterns">Match Patterns</a> for more details on the syntax of these strings. Must be specified for <a href="#method-registerContentScripts"><code translate="no" dir="ltr">registerContentScripts</code></a>.</p> </li><li class="stack"> <div> <div class="dcc-code-sections__label" id="property-RegisteredContentScript-persistAcrossSessions">persistAcrossSessions</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--boolean">boolean&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><p>Specifies if this content script will persist into future sessions. The default is true.</p> </li><li class="stack"> <div> <div class="dcc-code-sections__label" id="property-RegisteredContentScript-runAt">runAt</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--object"><a href="https://developer.chrome.com/docs/extensions/reference/extensionTypes/#type-RunAt">RunAt</a>&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><p>Specifies when JavaScript files are injected into the web page. The preferred and default value is <code translate="no" dir="ltr">document_idle</code>.</p> </li><li class="stack"> <div> <div class="dcc-code-sections__label" id="property-RegisteredContentScript-world">world</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--object"><a href="#type-ExecutionWorld">ExecutionWorld</a>&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><div class="pad-top-200"> <div><span class="dcc-tag-pill--blue dcc-tag-pill" title="Available from this Chrome version and higher">Chrome 102+ </span></div> </div><p>The JavaScript &quot;world&quot; to run the script in. Defaults to <code translate="no" dir="ltr">ISOLATED</code>.</p> </li></ul> </div><div> <div class="notranslate"> <h3 id="type-ScriptInjection" data-text="ScriptInjection" tabindex="-1">ScriptInjection</h3> </div></div><div class="dcc-code-sections"><h4 class="dcc-type--label dcc-code-sections__mode" id="properties_5" data-text="Properties" tabindex="-1">Properties</h4><ul class="stack"><li class="stack"> <div> <div class="dcc-code-sections__label" id="property-ScriptInjection-args">args</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--array">any[]&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><div class="pad-top-200"> <div><span class="dcc-tag-pill--blue dcc-tag-pill" title="Available from this Chrome version and higher">Chrome 92+ </span></div> </div><p>The arguments to pass to the provided function. This is only valid if the <code translate="no" dir="ltr">func</code> parameter is specified. These arguments must be JSON-serializable.</p> </li><li class="stack"> <div> <div class="dcc-code-sections__label" id="property-ScriptInjection-files">files</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--array">string[]&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><p>The path of the JS or CSS files to inject, relative to the extension's root directory. Exactly one of <code translate="no" dir="ltr">files</code> or <code translate="no" dir="ltr">func</code> must be specified.</p> </li><li class="stack"> <div> <div class="dcc-code-sections__label" id="property-ScriptInjection-injectImmediately">injectImmediately</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--boolean">boolean&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><div class="pad-top-200"> <div><span class="dcc-tag-pill--blue dcc-tag-pill" title="Available from this Chrome version and higher">Chrome 102+ </span></div> </div><p>Whether the injection should be triggered in the target as soon as possible. Note that this is not a guarantee that injection will occur prior to page load, as the page may have already loaded by the time the script reaches the target.</p> </li><li class="stack"> <div> <div class="dcc-code-sections__label" id="property-ScriptInjection-target">target</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--object"><a href="#type-InjectionTarget">InjectionTarget</a></p></div> </div><p>Details specifying the target into which to inject the script.</p> </li><li class="stack"> <div> <div class="dcc-code-sections__label" id="property-ScriptInjection-world">world</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--object"><a href="#type-ExecutionWorld">ExecutionWorld</a>&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><div class="pad-top-200"> <div><span class="dcc-tag-pill--blue dcc-tag-pill" title="Available from this Chrome version and higher">Chrome 95+ </span></div> </div><p>The JavaScript &quot;world&quot; to run the script in. Defaults to <code translate="no" dir="ltr">ISOLATED</code>.</p> </li><li class="stack"> <div> <div class="dcc-code-sections__label" id="method-ScriptInjection-func">func</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--">void&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><div class="pad-top-200"> <div><span class="dcc-tag-pill--blue dcc-tag-pill" title="Available from this Chrome version and higher">Chrome 92+ </span></div> </div><p>A JavaScript function to inject. This function will be serialized, and then deserialized for injection. This means that any bound parameters and execution context will be lost. Exactly one of <code translate="no" dir="ltr">files</code> or <code translate="no" dir="ltr">func</code> must be specified.</p> <p> The <code translate="no" dir="ltr">func</code> function looks like: <span class="dcc-code-sections__callback dcc-type--xsmall"><div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="TypeScript"><span class="devsite-syntax-p">()&nbsp;=>&nbsp;{...}</span></pre></devsite-code></span> </p></li></ul> </div><div> <div class="notranslate"> <h3 id="type-StyleOrigin" data-text="StyleOrigin" tabindex="-1">StyleOrigin</h3> </div><p>The origin for a style change. See <a href="https://developer.mozilla.org/en-US/docs/Glossary/Style_origin">style origins</a> for more info.</p> </div><div class="dcc-code-sections"><h4 class="dcc-type--label dcc-code-sections__mode" id="enum_1" data-text="Enum" tabindex="-1">Enum</h4><div class="dcc-code-sections__overline dcc-code-sections__label"> <p><span style="white-space: nowrap;"><p class="dcc-code-sections__icon dcc-code-sections__icon--stringdcc-code-sections__enum"><span class="dcc-code-sections__value">&quot;AUTHOR&quot;</span> <br> <span class="dcc-type--xsmall" style="white-space: initial"></span></p></span><span style="white-space: nowrap;"><p class="dcc-code-sections__icon dcc-code-sections__icon--stringdcc-code-sections__enum"><span class="dcc-code-sections__value">&quot;USER&quot;</span> <br> <span class="dcc-type--xsmall" style="white-space: initial"></span></p></span></p> </div> </div></div><h2 id="method" data-text="Methods" tabindex="-1">Methods</h2> <div><div> <div class="notranslate"> <h3 id="method-executeScript" data-text="executeScript()" tabindex="-1">executeScript()</h3> </div><div class=""> <div><span class="dcc-tag-pill--green dcc-tag-pill" title="Can return its result via Promise in Manifest V3 or later."> Promise </span></div> </div><span class="dcc-code-sections__callback dcc-type--xsmall"> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="TypeScript"><span class="devsite-syntax-nx">chrome</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">scripting</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">executeScript</span><span class="devsite-syntax-p">(</span><br />&nbsp;&nbsp;<span class="devsite-syntax-nx">injection</span><span class="devsite-syntax-o">:</span>&nbsp;<a href="#type-ScriptInjection"><span class="devsite-syntax-kt">ScriptInjection</span></a><span class="devsite-syntax-p">,</span><br />&nbsp;&nbsp;<span class="devsite-syntax-nx">callback?</span><span class="devsite-syntax-o">:</span>&nbsp;<span class="devsite-syntax-kt">function</span><span class="devsite-syntax-p">,<br />)</span></pre></devsite-code> </span><p>Injects a script into a target context. By default, the script will be run at <code translate="no" dir="ltr">document_idle</code>, or immediately if the page has already loaded. If the <code translate="no" dir="ltr">injectImmediately</code> property is set, the script will inject without waiting, even if the page has not finished loading. If the script evaluates to a promise, the browser will wait for the promise to settle and return the resulting value.</p> </div><div class="dcc-code-sections"><h4 class="dcc-type--label dcc-code-sections__mode" id="parameters" data-text="Parameters" tabindex="-1">Parameters</h4><ul class="stack"><li class="stack"> <div> <div class="dcc-code-sections__label" id="type-executeScript-injection">injection</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--object"><a href="#type-ScriptInjection">ScriptInjection</a></p></div> </div><p>The details of the script which to inject.</p> </li><li class="stack"> <div> <div class="dcc-code-sections__label" id="method-executeScript-callback">callback</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--function">function&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><p> The <code translate="no" dir="ltr">callback</code> parameter looks like: <span class="dcc-code-sections__callback dcc-type--xsmall"><div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="TypeScript"><span class="devsite-syntax-p">(</span><span class="devsite-syntax-nx">results</span><span class="devsite-syntax-o">:</span>&nbsp;<a href="#type-InjectionResult"><span class="devsite-syntax-kt">InjectionResult</span></a><span class="devsite-syntax-p">[])&nbsp;=></span>&nbsp;<span class="devsite-syntax-ow">void</span></pre></devsite-code></span> </p><div class="dcc-code-sections"><ul class="stack"><li class="stack"> <div> <div class="dcc-code-sections__label" id="type-executeScript-callback-results">results</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--array"><a href="#type-InjectionResult">InjectionResult</a>[]</p></div> </div></li></ul> </div></li></ul> </div><div class="dcc-code-sections"><h4 class="dcc-type--label dcc-code-sections__mode" id="returns" data-text="Returns" tabindex="-1">Returns</h4><ul class="stack"> <li class="stack"> <div><div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--object">Promise&lt;<a href="#type-InjectionResult">InjectionResult</a>[]&gt;</p></div> </div><div class="pad-top-200"> <div><span class="dcc-tag-pill--blue dcc-tag-pill" title="Available from this Chrome version and higher">Chrome 90+ </span></div> </div> <p> Promises are supported in Manifest V3 and later, but callbacks are provided for backward compatibility. You cannot use both on the same function call. The promise resolves with the same type that is passed to the callback. </p> </li> </ul> </div><div> <div class="notranslate"> <h3 id="method-getRegisteredContentScripts" data-text="getRegisteredContentScripts()" tabindex="-1">getRegisteredContentScripts()</h3> </div><div class=""> <div><span class="dcc-tag-pill--green dcc-tag-pill" title="Can return its result via Promise in Manifest V3 or later."> Promise </span><span class="dcc-tag-pill--blue dcc-tag-pill" title="Available from this Chrome version and higher">Chrome 96+ </span></div> </div><span class="dcc-code-sections__callback dcc-type--xsmall"> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="TypeScript"><span class="devsite-syntax-nx">chrome</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">scripting</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">getRegisteredContentScripts</span><span class="devsite-syntax-p">(</span><br />&nbsp;&nbsp;<span class="devsite-syntax-nx">filter?</span><span class="devsite-syntax-o">:</span>&nbsp;<a href="#type-ContentScriptFilter"><span class="devsite-syntax-kt">ContentScriptFilter</span></a><span class="devsite-syntax-p">,</span><br />&nbsp;&nbsp;<span class="devsite-syntax-nx">callback?</span><span class="devsite-syntax-o">:</span>&nbsp;<span class="devsite-syntax-kt">function</span><span class="devsite-syntax-p">,<br />)</span></pre></devsite-code> </span><p>Returns all dynamically registered content scripts for this extension that match the given filter.</p> </div><div class="dcc-code-sections"><h4 class="dcc-type--label dcc-code-sections__mode" id="parameters_1" data-text="Parameters" tabindex="-1">Parameters</h4><ul class="stack"><li class="stack"> <div> <div class="dcc-code-sections__label" id="type-getRegisteredContentScripts-filter">filter</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--object"><a href="#type-ContentScriptFilter">ContentScriptFilter</a>&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><p>An object to filter the extension's dynamically registered scripts.</p> </li><li class="stack"> <div> <div class="dcc-code-sections__label" id="method-getRegisteredContentScripts-callback">callback</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--function">function&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><p> The <code translate="no" dir="ltr">callback</code> parameter looks like: <span class="dcc-code-sections__callback dcc-type--xsmall"><div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="TypeScript"><span class="devsite-syntax-p">(</span><span class="devsite-syntax-nx">scripts</span><span class="devsite-syntax-o">:</span>&nbsp;<a href="#type-RegisteredContentScript"><span class="devsite-syntax-kt">RegisteredContentScript</span></a><span class="devsite-syntax-p">[])&nbsp;=></span>&nbsp;<span class="devsite-syntax-ow">void</span></pre></devsite-code></span> </p><div class="dcc-code-sections"><ul class="stack"><li class="stack"> <div> <div class="dcc-code-sections__label" id="type-getRegisteredContentScripts-callback-scripts">scripts</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--array"><a href="#type-RegisteredContentScript">RegisteredContentScript</a>[]</p></div> </div></li></ul> </div></li></ul> </div><div class="dcc-code-sections"><h4 class="dcc-type--label dcc-code-sections__mode" id="returns_1" data-text="Returns" tabindex="-1">Returns</h4><ul class="stack"> <li class="stack"> <div><div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--object">Promise&lt;<a href="#type-RegisteredContentScript">RegisteredContentScript</a>[]&gt;</p></div> </div> <p> Promises are supported in Manifest V3 and later, but callbacks are provided for backward compatibility. You cannot use both on the same function call. The promise resolves with the same type that is passed to the callback. </p> </li> </ul> </div><div> <div class="notranslate"> <h3 id="method-insertCSS" data-text="insertCSS()" tabindex="-1">insertCSS()</h3> </div><div class=""> <div><span class="dcc-tag-pill--green dcc-tag-pill" title="Can return its result via Promise in Manifest V3 or later."> Promise </span></div> </div><span class="dcc-code-sections__callback dcc-type--xsmall"> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="TypeScript"><span class="devsite-syntax-nx">chrome</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">scripting</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">insertCSS</span><span class="devsite-syntax-p">(</span><br />&nbsp;&nbsp;<span class="devsite-syntax-nx">injection</span><span class="devsite-syntax-o">:</span>&nbsp;<a href="#type-CSSInjection"><span class="devsite-syntax-kt">CSSInjection</span></a><span class="devsite-syntax-p">,</span><br />&nbsp;&nbsp;<span class="devsite-syntax-nx">callback?</span><span class="devsite-syntax-o">:</span>&nbsp;<span class="devsite-syntax-kt">function</span><span class="devsite-syntax-p">,<br />)</span></pre></devsite-code> </span><p>Inserts a CSS stylesheet into a target context. If multiple frames are specified, unsuccessful injections are ignored.</p> </div><div class="dcc-code-sections"><h4 class="dcc-type--label dcc-code-sections__mode" id="parameters_2" data-text="Parameters" tabindex="-1">Parameters</h4><ul class="stack"><li class="stack"> <div> <div class="dcc-code-sections__label" id="type-insertCSS-injection">injection</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--object"><a href="#type-CSSInjection">CSSInjection</a></p></div> </div><p>The details of the styles to insert.</p> </li><li class="stack"> <div> <div class="dcc-code-sections__label" id="method-insertCSS-callback">callback</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--function">function&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><p> The <code translate="no" dir="ltr">callback</code> parameter looks like: <span class="dcc-code-sections__callback dcc-type--xsmall"><div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="TypeScript"><span class="devsite-syntax-p">()&nbsp;=></span>&nbsp;<span class="devsite-syntax-ow">void</span></pre></devsite-code></span> </p></li></ul> </div><div class="dcc-code-sections"><h4 class="dcc-type--label dcc-code-sections__mode" id="returns_2" data-text="Returns" tabindex="-1">Returns</h4><ul class="stack"> <li class="stack"> <div><div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--object">Promise&lt;void&gt;</p></div> </div><div class="pad-top-200"> <div><span class="dcc-tag-pill--blue dcc-tag-pill" title="Available from this Chrome version and higher">Chrome 90+ </span></div> </div> <p> Promises are supported in Manifest V3 and later, but callbacks are provided for backward compatibility. You cannot use both on the same function call. The promise resolves with the same type that is passed to the callback. </p> </li> </ul> </div><div> <div class="notranslate"> <h3 id="method-registerContentScripts" data-text="registerContentScripts()" tabindex="-1">registerContentScripts()</h3> </div><div class=""> <div><span class="dcc-tag-pill--green dcc-tag-pill" title="Can return its result via Promise in Manifest V3 or later."> Promise </span><span class="dcc-tag-pill--blue dcc-tag-pill" title="Available from this Chrome version and higher">Chrome 96+ </span></div> </div><span class="dcc-code-sections__callback dcc-type--xsmall"> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="TypeScript"><span class="devsite-syntax-nx">chrome</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">scripting</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">registerContentScripts</span><span class="devsite-syntax-p">(</span><br />&nbsp;&nbsp;<span class="devsite-syntax-nx">scripts</span><span class="devsite-syntax-o">:</span>&nbsp;<a href="#type-RegisteredContentScript"><span class="devsite-syntax-kt">RegisteredContentScript</span></a><span class="devsite-syntax-p">[],</span><br />&nbsp;&nbsp;<span class="devsite-syntax-nx">callback?</span><span class="devsite-syntax-o">:</span>&nbsp;<span class="devsite-syntax-kt">function</span><span class="devsite-syntax-p">,<br />)</span></pre></devsite-code> </span><p>Registers one or more content scripts for this extension.</p> </div><div class="dcc-code-sections"><h4 class="dcc-type--label dcc-code-sections__mode" id="parameters_3" data-text="Parameters" tabindex="-1">Parameters</h4><ul class="stack"><li class="stack"> <div> <div class="dcc-code-sections__label" id="type-registerContentScripts-scripts">scripts</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--array"><a href="#type-RegisteredContentScript">RegisteredContentScript</a>[]</p></div> </div><p>Contains a list of scripts to be registered. If there are errors during script parsing/file validation, or if the IDs specified already exist, then no scripts are registered.</p> </li><li class="stack"> <div> <div class="dcc-code-sections__label" id="method-registerContentScripts-callback">callback</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--function">function&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><p> The <code translate="no" dir="ltr">callback</code> parameter looks like: <span class="dcc-code-sections__callback dcc-type--xsmall"><div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="TypeScript"><span class="devsite-syntax-p">()&nbsp;=></span>&nbsp;<span class="devsite-syntax-ow">void</span></pre></devsite-code></span> </p></li></ul> </div><div class="dcc-code-sections"><h4 class="dcc-type--label dcc-code-sections__mode" id="returns_3" data-text="Returns" tabindex="-1">Returns</h4><ul class="stack"> <li class="stack"> <div><div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--object">Promise&lt;void&gt;</p></div> </div> <p> Promises are supported in Manifest V3 and later, but callbacks are provided for backward compatibility. You cannot use both on the same function call. The promise resolves with the same type that is passed to the callback. </p> </li> </ul> </div><div> <div class="notranslate"> <h3 id="method-removeCSS" data-text="removeCSS()" tabindex="-1">removeCSS()</h3> </div><div class=""> <div><span class="dcc-tag-pill--green dcc-tag-pill" title="Can return its result via Promise in Manifest V3 or later."> Promise </span><span class="dcc-tag-pill--blue dcc-tag-pill" title="Available from this Chrome version and higher">Chrome 90+ </span></div> </div><span class="dcc-code-sections__callback dcc-type--xsmall"> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="TypeScript"><span class="devsite-syntax-nx">chrome</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">scripting</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">removeCSS</span><span class="devsite-syntax-p">(</span><br />&nbsp;&nbsp;<span class="devsite-syntax-nx">injection</span><span class="devsite-syntax-o">:</span>&nbsp;<a href="#type-CSSInjection"><span class="devsite-syntax-kt">CSSInjection</span></a><span class="devsite-syntax-p">,</span><br />&nbsp;&nbsp;<span class="devsite-syntax-nx">callback?</span><span class="devsite-syntax-o">:</span>&nbsp;<span class="devsite-syntax-kt">function</span><span class="devsite-syntax-p">,<br />)</span></pre></devsite-code> </span><p>Removes a CSS stylesheet that was previously inserted by this extension from a target context.</p> </div><div class="dcc-code-sections"><h4 class="dcc-type--label dcc-code-sections__mode" id="parameters_4" data-text="Parameters" tabindex="-1">Parameters</h4><ul class="stack"><li class="stack"> <div> <div class="dcc-code-sections__label" id="type-removeCSS-injection">injection</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--object"><a href="#type-CSSInjection">CSSInjection</a></p></div> </div><p>The details of the styles to remove. Note that the <code translate="no" dir="ltr">css</code>, <code translate="no" dir="ltr">files</code>, and <code translate="no" dir="ltr">origin</code> properties must exactly match the stylesheet inserted through <a href="#method-insertCSS"><code translate="no" dir="ltr">insertCSS</code></a>. Attempting to remove a non-existent stylesheet is a no-op.</p> </li><li class="stack"> <div> <div class="dcc-code-sections__label" id="method-removeCSS-callback">callback</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--function">function&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><p> The <code translate="no" dir="ltr">callback</code> parameter looks like: <span class="dcc-code-sections__callback dcc-type--xsmall"><div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="TypeScript"><span class="devsite-syntax-p">()&nbsp;=></span>&nbsp;<span class="devsite-syntax-ow">void</span></pre></devsite-code></span> </p></li></ul> </div><div class="dcc-code-sections"><h4 class="dcc-type--label dcc-code-sections__mode" id="returns_4" data-text="Returns" tabindex="-1">Returns</h4><ul class="stack"> <li class="stack"> <div><div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--object">Promise&lt;void&gt;</p></div> </div> <p> Promises are supported in Manifest V3 and later, but callbacks are provided for backward compatibility. You cannot use both on the same function call. The promise resolves with the same type that is passed to the callback. </p> </li> </ul> </div><div> <div class="notranslate"> <h3 id="method-unregisterContentScripts" data-text="unregisterContentScripts()" tabindex="-1">unregisterContentScripts()</h3> </div><div class=""> <div><span class="dcc-tag-pill--green dcc-tag-pill" title="Can return its result via Promise in Manifest V3 or later."> Promise </span><span class="dcc-tag-pill--blue dcc-tag-pill" title="Available from this Chrome version and higher">Chrome 96+ </span></div> </div><span class="dcc-code-sections__callback dcc-type--xsmall"> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="TypeScript"><span class="devsite-syntax-nx">chrome</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">scripting</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">unregisterContentScripts</span><span class="devsite-syntax-p">(</span><br />&nbsp;&nbsp;<span class="devsite-syntax-nx">filter?</span><span class="devsite-syntax-o">:</span>&nbsp;<a href="#type-ContentScriptFilter"><span class="devsite-syntax-kt">ContentScriptFilter</span></a><span class="devsite-syntax-p">,</span><br />&nbsp;&nbsp;<span class="devsite-syntax-nx">callback?</span><span class="devsite-syntax-o">:</span>&nbsp;<span class="devsite-syntax-kt">function</span><span class="devsite-syntax-p">,<br />)</span></pre></devsite-code> </span><p>Unregisters content scripts for this extension.</p> </div><div class="dcc-code-sections"><h4 class="dcc-type--label dcc-code-sections__mode" id="parameters_5" data-text="Parameters" tabindex="-1">Parameters</h4><ul class="stack"><li class="stack"> <div> <div class="dcc-code-sections__label" id="type-unregisterContentScripts-filter">filter</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--object"><a href="#type-ContentScriptFilter">ContentScriptFilter</a>&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><p>If specified, only unregisters dynamic content scripts which match the filter. Otherwise, all of the extension's dynamic content scripts are unregistered.</p> </li><li class="stack"> <div> <div class="dcc-code-sections__label" id="method-unregisterContentScripts-callback">callback</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--function">function&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><p> The <code translate="no" dir="ltr">callback</code> parameter looks like: <span class="dcc-code-sections__callback dcc-type--xsmall"><div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="TypeScript"><span class="devsite-syntax-p">()&nbsp;=></span>&nbsp;<span class="devsite-syntax-ow">void</span></pre></devsite-code></span> </p></li></ul> </div><div class="dcc-code-sections"><h4 class="dcc-type--label dcc-code-sections__mode" id="returns_5" data-text="Returns" tabindex="-1">Returns</h4><ul class="stack"> <li class="stack"> <div><div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--object">Promise&lt;void&gt;</p></div> </div> <p> Promises are supported in Manifest V3 and later, but callbacks are provided for backward compatibility. You cannot use both on the same function call. The promise resolves with the same type that is passed to the callback. </p> </li> </ul> </div><div> <div class="notranslate"> <h3 id="method-updateContentScripts" data-text="updateContentScripts()" tabindex="-1">updateContentScripts()</h3> </div><div class=""> <div><span class="dcc-tag-pill--green dcc-tag-pill" title="Can return its result via Promise in Manifest V3 or later."> Promise </span><span class="dcc-tag-pill--blue dcc-tag-pill" title="Available from this Chrome version and higher">Chrome 96+ </span></div> </div><span class="dcc-code-sections__callback dcc-type--xsmall"> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="TypeScript"><span class="devsite-syntax-nx">chrome</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">scripting</span><span class="devsite-syntax-p">.</span><span class="devsite-syntax-nx">updateContentScripts</span><span class="devsite-syntax-p">(</span><br />&nbsp;&nbsp;<span class="devsite-syntax-nx">scripts</span><span class="devsite-syntax-o">:</span>&nbsp;<a href="#type-RegisteredContentScript"><span class="devsite-syntax-kt">RegisteredContentScript</span></a><span class="devsite-syntax-p">[],</span><br />&nbsp;&nbsp;<span class="devsite-syntax-nx">callback?</span><span class="devsite-syntax-o">:</span>&nbsp;<span class="devsite-syntax-kt">function</span><span class="devsite-syntax-p">,<br />)</span></pre></devsite-code> </span><p>Updates one or more content scripts for this extension.</p> </div><div class="dcc-code-sections"><h4 class="dcc-type--label dcc-code-sections__mode" id="parameters_6" data-text="Parameters" tabindex="-1">Parameters</h4><ul class="stack"><li class="stack"> <div> <div class="dcc-code-sections__label" id="type-updateContentScripts-scripts">scripts</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--array"><a href="#type-RegisteredContentScript">RegisteredContentScript</a>[]</p></div> </div><p>Contains a list of scripts to be updated. A property is only updated for the existing script if it is specified in this object. If there are errors during script parsing/file validation, or if the IDs specified do not correspond to a fully registered script, then no scripts are updated.</p> </li><li class="stack"> <div> <div class="dcc-code-sections__label" id="method-updateContentScripts-callback">callback</div> <div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--function">function&nbsp;<span class="dcc-code-sections__optional">optional</span></p></div> </div><p> The <code translate="no" dir="ltr">callback</code> parameter looks like: <span class="dcc-code-sections__callback dcc-type--xsmall"><div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="TypeScript"><span class="devsite-syntax-p">()&nbsp;=></span>&nbsp;<span class="devsite-syntax-ow">void</span></pre></devsite-code></span> </p></li></ul> </div><div class="dcc-code-sections"><h4 class="dcc-type--label dcc-code-sections__mode" id="returns_6" data-text="Returns" tabindex="-1">Returns</h4><ul class="stack"> <li class="stack"> <div><div class="dcc-type--xsmall"><p class="dcc-code-sections__icon dcc-code-sections__icon--object">Promise&lt;void&gt;</p></div> </div> <p> Promises are supported in Manifest V3 and later, but callbacks are provided for backward compatibility. You cannot use both on the same function call. The promise resolves with the same type that is passed to the callback. </p> </li> </ul> </div></div></div> </p> </div> <devsite-thumb-rating position="footer"> </devsite-thumb-rating> <div class="devsite-floating-action-buttons"> </div> </article> <devsite-content-footer class="nocontent"> <p>Except as otherwise noted, the content of this page is licensed under the <a href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 License</a>, and code samples are licensed under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache 2.0 License</a>. For details, see the <a href="https://developers.google.com/site-policies">Google Developers Site Policies</a>. Java is a registered trademark of Oracle and/or its affiliates.</p> <p>Last updated 2024-05-24 UTC.</p> </devsite-content-footer> <devsite-notification > </devsite-notification> <div class="devsite-content-data"> <template class="devsite-content-data-template"> [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-05-24 UTC."],[],[]] </template> </div> </devsite-content> </main> <devsite-footer-promos class="devsite-footer"> </devsite-footer-promos> <devsite-footer-linkboxes class="devsite-footer"> <nav class="devsite-footer-linkboxes nocontent" aria-label="Footer links"> <ul class="devsite-footer-linkboxes-list"> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Contribute</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="https://issuetracker.google.com/issues/new?component=1400036&amp;template=1897236" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)" > File a bug </a> </li> <li class="devsite-footer-linkbox-item"> <a href="https://issuetracker.google.com/issues?q=status:open%20componentid:1400036&amp;s=created_time:desc" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)" > See open issues </a> </li> </ul> </li> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Related content</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="https://blog.chromium.org/" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)" > Chromium updates </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/case-studies" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)" > Case studies </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/deprecated" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)" > Archive </a> </li> <li class="devsite-footer-linkbox-item"> <a href="https://web.dev/shows" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 4)" > Podcasts &amp; shows </a> </li> </ul> </li> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Follow</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="https://twitter.com/ChromiumDev" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)" > @ChromiumDev on X </a> </li> <li class="devsite-footer-linkbox-item"> <a href="https://www.youtube.com/user/ChromeDevelopers" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)" > YouTube </a> </li> <li class="devsite-footer-linkbox-item"> <a href="https://www.linkedin.com/showcase/chrome-for-developers" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)" > Chrome for Developers on LinkedIn </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/static/blog/feed.xml" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 4)" > RSS </a> </li> </ul> </li> </ul> </nav> </devsite-footer-linkboxes> <devsite-footer-utility class="devsite-footer"> <div class="devsite-footer-utility nocontent"> <nav class="devsite-footer-utility-links" aria-label="Utility links"> <ul class="devsite-footer-utility-list"> <li class="devsite-footer-utility-item "> <a class="devsite-footer-utility-link gc-analytics-event" href="//policies.google.com/terms" data-category="Site-Wide Custom Events" data-label="Footer Terms link" > Terms </a> </li> <li class="devsite-footer-utility-item "> <a class="devsite-footer-utility-link gc-analytics-event" href="//policies.google.com/privacy" data-category="Site-Wide Custom Events" data-label="Footer Privacy link" > Privacy </a> </li> <li class="devsite-footer-utility-item glue-cookie-notification-bar-control"> <a class="devsite-footer-utility-link gc-analytics-event" href="#" data-category="Site-Wide Custom Events" data-label="Footer Manage cookies link" aria-hidden="true" > Manage cookies </a> </li> </ul> <devsite-language-selector> <ul role="presentation"> <li role="presentation"> <a role="menuitem" lang="en" >English</a> </li> <li role="presentation"> <a role="menuitem" lang="de" >Deutsch</a> </li> <li role="presentation"> <a role="menuitem" lang="es_419" >Español – América Latina</a> </li> <li role="presentation"> <a role="menuitem" lang="fr" >Français</a> </li> <li role="presentation"> <a role="menuitem" lang="id" >Indonesia</a> </li> <li role="presentation"> <a role="menuitem" lang="it" >Italiano</a> </li> <li role="presentation"> <a role="menuitem" lang="nl" >Nederlands</a> </li> <li role="presentation"> <a role="menuitem" lang="pl" >Polski</a> </li> <li role="presentation"> <a role="menuitem" lang="pt_br" >Português – Brasil</a> </li> <li role="presentation"> <a role="menuitem" lang="vi" >Tiếng Việt</a> </li> <li role="presentation"> <a role="menuitem" lang="tr" >Türkçe</a> </li> <li role="presentation"> <a role="menuitem" lang="ru" >Русский</a> </li> <li role="presentation"> <a role="menuitem" lang="he" >עברית</a> </li> <li role="presentation"> <a role="menuitem" lang="ar" >العربيّة</a> </li> <li role="presentation"> <a role="menuitem" lang="fa" >فارسی</a> </li> <li role="presentation"> <a role="menuitem" lang="hi" >हिंदी</a> </li> <li role="presentation"> <a role="menuitem" lang="bn" >বাংলা</a> </li> <li role="presentation"> <a role="menuitem" lang="th" >ภาษาไทย</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_cn" >中文 – 简体</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_tw" >中文 – 繁體</a> </li> <li role="presentation"> <a role="menuitem" lang="ja" >日本語</a> </li> <li role="presentation"> <a role="menuitem" lang="ko" >한국어</a> </li> </ul> </devsite-language-selector> </nav> </div> </devsite-footer-utility> <devsite-panel></devsite-panel> </section></section> <devsite-sitemask></devsite-sitemask> <devsite-snackbar></devsite-snackbar> <devsite-tooltip ></devsite-tooltip> <devsite-heading-link></devsite-heading-link> <devsite-analytics> <script type="application/json" analytics>[]</script> <script type="application/json" tag-management>{&#34;at&#34;: &#34;True&#34;, &#34;ga4&#34;: [], &#34;ga4p&#34;: [], &#34;gtm&#34;: [{&#34;id&#34;: &#34;GTM-5QF3RT2&#34;, &#34;purpose&#34;: 0}], &#34;parameters&#34;: {&#34;internalUser&#34;: &#34;False&#34;, &#34;language&#34;: {&#34;machineTranslated&#34;: &#34;False&#34;, &#34;requested&#34;: &#34;en&#34;, &#34;served&#34;: &#34;en&#34;}, &#34;pageType&#34;: &#34;article&#34;, &#34;projectName&#34;: &#34;API&#34;, &#34;signedIn&#34;: &#34;False&#34;, &#34;tenant&#34;: &#34;chrome&#34;, &#34;recommendations&#34;: {&#34;sourcePage&#34;: &#34;&#34;, &#34;sourceType&#34;: 0, &#34;sourceRank&#34;: 0, &#34;sourceIdenticalDescriptions&#34;: 0, &#34;sourceTitleWords&#34;: 0, &#34;sourceDescriptionWords&#34;: 0, &#34;experiment&#34;: &#34;&#34;}, &#34;experiment&#34;: {&#34;ids&#34;: &#34;&#34;}}}</script> </devsite-analytics> <devsite-badger></devsite-badger> <script nonce="VxqeqbCBd01GV3QEx/tovfnJ/Eq246"> (function(d,e,v,s,i,t,E){d['GoogleDevelopersObject']=i; t=e.createElement(v);t.async=1;t.src=s;E=e.getElementsByTagName(v)[0]; E.parentNode.insertBefore(t,E);})(window, document, 'script', 'https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/chrome/js/app_loader.js', '[53,"en",null,"/js/devsite_app_module.js","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/chrome","https://chrome-dot-devsite-v2-prod-3p.appspot.com",null,null,["/_pwa/chrome/manifest.json","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/images/video-placeholder.svg","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/chrome/images/favicon.png","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/chrome/images/lockup.svg","https://fonts.googleapis.com/css?family=Google+Sans:400,500|Roboto:400,400italic,500,500italic,700,700italic|Roboto+Mono:400,500,700&display=swap"],1,null,[1,6,8,12,14,17,21,25,50,52,63,70,75,76,80,87,91,92,93,97,98,100,101,102,103,104,105,107,108,109,110,112,113,117,118,120,122,124,125,126,127,129,130,131,132,133,134,135,136,138,140,141,147,148,149,151,152,156,157,158,159,161,163,164,168,169,170,179,180,182,183,186,191,193,196],"AIzaSyCNm9YxQumEXwGJgTDjxoxXK6m1F-9720Q","AIzaSyCc76DZePGtoyUjqKrLdsMGk_ry7sljLbY","developer.chrome.com","AIzaSyB9bqgQ2t11WJsOX8qNsCQ6U-w91mmqF-I","AIzaSyAdYnStPdzjcJJtQ0mvIaeaMKj7_t6J_Fg",null,null,null,["EngEduTelemetry__enable_engedu_telemetry","Experiments__reqs_query_experiments","Cloud__enable_cloudx_ping","Profiles__require_profile_eligibility_for_signin","Cloud__enable_cloud_shell","CloudShell__cloud_code_overflow_menu","DevPro__enable_cloud_innovators_plus","OnSwitch__enable","TpcFeatures__enable_required_headers","Profiles__enable_profile_collections","Search__enable_suggestions_from_borg","Cloud__enable_cloud_shell_fte_user_flow","Analytics__enable_clearcut_logging","Search__enable_dynamic_content_confidential_banner","DevPro__enable_developer_subscriptions","MiscFeatureFlags__enable_project_variables","MiscFeatureFlags__enable_explain_this_code","Cloud__enable_llm_concierge_chat","MiscFeatureFlags__enable_firebase_utm","MiscFeatureFlags__emergency_css","MiscFeatureFlags__developers_footer_dark_image","Cloud__enable_legacy_calculator_redirect","MiscFeatureFlags__enable_variable_operator","Profiles__enable_dashboard_curated_recommendations","MiscFeatureFlags__developers_footer_image","Search__enable_page_map","Profiles__enable_recognition_badges","Profiles__enable_page_saving","Cloud__enable_cloud_facet_chat","TpcFeatures__enable_mirror_tenant_redirects","Cloud__enable_cloud_dlp_service","Profiles__enable_complete_playlist_endpoint","Concierge__enable_pushui","Profiles__enable_awarding_url","Profiles__enable_release_notes_notifications","BookNav__enable_tenant_cache_key","MiscFeatureFlags__enable_view_transitions","Search__enable_ai_eligibility_checks","Profiles__enable_completecodelab_endpoint","Profiles__enable_developer_profiles_callout","Cloud__enable_cloudx_experiment_ids","CloudShell__cloud_shell_button","Cloud__enable_free_trial_server_call","Profiles__enable_public_developer_profiles"],null,null,"AIzaSyA58TaKli1DculwmAmbpzLVGuWc8eCQgQc","https://developerscontentserving-pa.googleapis.com","AIzaSyDWBU60w0P9hEkr29kkksYs8Z7gvZ8u_wc","https://developerscontentsearch-pa.googleapis.com",2,4,null,"https://developerprofiles-pa.googleapis.com",[53,"chrome","Chrome for Developers","developer.chrome.com",null,"chrome-dot-devsite-v2-prod-3p.appspot.com",null,null,[null,null,null,null,null,null,null,null,null,null,null,[1],null,null,null,null,null,null,[1],null,null,null,null,[1,null,1],[1,1,null,1,1]],null,[69,null,null,null,null,null,"/images/lockup.svg","/images/touchicon-180.png",null,null,null,1,1,null,null,null,null,null,null,null,null,2,null,null,null,"/images/lockup-dark-theme.svg",[]],[],null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[[],[1,1]],[[null,null,null,null,null,["GTM-5QF3RT2"],null,null,null,null,null,[["GTM-5QF3RT2",1]],1]],null,4]]') </script> <devsite-a11y-announce></devsite-a11y-announce> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10