Chrome extension developer interview questions and answers

Chrome extension developer interview questions test whether you understand how an extension is built under Manifest V3: the manifest and permissions, a background service worker that can stop at any time, content scripts in an isolated world, message passing between them, storage, and the Chrome Web Store review. Expect JavaScript and DOM questions, debugging scenarios, privacy and security questions, and often a take-home exercise to build a small extension.

By Published 9 min read

What the role involves

Extension developers build features that live inside the browser: tools that read or change web pages, add a panel beside them, capture data, block content, or connect a website to a company's own product. Some companies ship an extension as their main product; others add one to a web app. The work mixes frontend development for popups and panels, careful JavaScript for content scripts that must survive pages they do not control, and browser platform knowledge that most web developers never need. Hiring managers look for that platform knowledge, a sense for privacy and permissions, and the patience to debug across several contexts at once.

How the interview process usually runs

  • Recruiter screen. Extensions you have shipped, their users or store listings if public, and your JavaScript or TypeScript level.
  • Technical interview on JavaScript. Async code, closures, the event loop, DOM manipulation and events. Sometimes a live coding exercise.
  • Extension platform interview. Architecture, lifecycle, messaging, permissions and storage, often around a design problem.
  • Take-home or pairing exercise. Common: build a small extension, such as one that highlights words on a page and saves them, or fix a broken one.
  • Product and team conversation. How you handle store reviews, user privacy and cross-team work with backend or design.

Fundamentals: manifest, contexts and permissions

Fundamental questions
QuestionWhat it testsWhat a strong answer shows
What are the main parts of a Manifest V3 extension?Architecture basicsManifest, background service worker, content scripts, action popup or side panel, options page, and how each runs in its own context
What changed from Manifest V2 to V3?Platform awarenessBackground pages became service workers, blocking web requests largely moved to declarativeNetRequest, remotely hosted code is not allowed, host permissions are declared separately
What is the difference between permissions and host_permissions?Permission modelAPI permissions such as storage or tabs versus access to specific sites; host access triggers stronger warnings and can be made optional
What does activeTab give you?Least privilegeTemporary access to the current tab after a user gesture, which avoids asking for broad host access up front
What is the isolated world for content scripts?Execution contextContent scripts share the page's DOM but not its JavaScript variables, which protects both sides
How do content scripts get into a page?Injection optionsDeclared in the manifest with match patterns and a run_at timing, or injected on demand with the scripting API
Where can an extension store data?Storage choiceschrome.storage.local for device data, sync for small settings that follow the user, session for in-memory data; IndexedDB for larger data
Fundamental questions. Scroll sideways on a small screen.
{
  "manifest_version": 3,
  "name": "Word Saver",
  "version": "1.0.0",
  "description": "Highlight a word on any page and save it for later.",
  "action": { "default_popup": "popup.html" },
  "background": { "service_worker": "background.js" },
  "permissions": ["storage", "activeTab", "scripting"],
  "optional_host_permissions": ["https://*/*"],
  "content_scripts": [
    {
      "matches": ["https://*.example.com/*"],
      "js": ["content.js"],
      "run_at": "document_idle"
    }
  ]
}
A minimal Manifest V3 file for a page-highlighting extension (illustrative)

In an interview, explain each permission line. Interviewers like candidates who say that broad host access is optional here and requested only when the user turns on a feature, because install warnings and store review both depend on what you ask for.

Service worker lifecycle and messaging questions

  • Why did my background state disappear after a few minutes? The service worker was stopped while idle and restarted on the next event. Keep state in chrome.storage, rebuild it on startup, and register listeners at the top level so they exist when the worker wakes.
  • How do you run something every hour? Use the alarms API rather than setInterval, because timers die with the worker.
  • How does a content script talk to the service worker? One-off messages with runtime.sendMessage and tabs.sendMessage, or a long-lived port with runtime.connect for streams of messages.
  • How do you send an asynchronous reply to a message? Call sendResponse later and keep the channel open, traditionally by returning true from the listener. Some browsers also accept a returned promise; check the documentation for the browsers and versions you support.
  • The service worker needs to use DOM APIs. What do you do? Workers have no DOM, so use an offscreen document for tasks such as parsing HTML or certain clipboard and audio work, within the reasons Chrome allows.
  • How would you share state between the popup, side panel and content scripts? Treat chrome.storage as the source of truth and listen for its change events, instead of passing copies around.
// content.js
const word = String(window.getSelection()).trim();
if (word) {
  chrome.runtime.sendMessage({ type: "lookup", word: word }, (reply) => {
    if (chrome.runtime.lastError || !reply || !reply.ok) return;
    console.log("Definition:", reply.data);
  });
}

// background.js (registered at the top level of the service worker)
chrome.runtime.onMessage.addListener((msg, sender, sendResponse) => {
  if (msg.type !== "lookup") return false;
  fetch("https://api.example.com/define?q=" + encodeURIComponent(msg.word))
    .then((res) => res.json())
    .then((data) => sendResponse({ ok: true, data: data }))
    .catch((err) => sendResponse({ ok: false, error: String(err) }));
  return true; // keep the message channel open for the async reply
});
Content script asks the service worker for data; the worker replies asynchronously

Common follow-ups on this snippet: why check runtime.lastError (the receiving end may not exist, for example after an update), why encodeURIComponent, and where the request should go if the API needs a secret (to your own server, never inside the extension, since its code can be read).

Content scripts and real-world pages

  • The page is a single-page app and your content script runs only once. How do you react to navigation? Watch for DOM changes with a MutationObserver, listen for history changes, or use the webNavigation events from the worker, and keep the handler idempotent.
  • How do you add UI to a page without the site's CSS breaking it? Render inside a shadow root, or an iframe pointing at an extension page, and avoid generic class names.
  • How do you avoid slowing down heavy pages? Run at document_idle when possible, debounce observers, batch DOM writes and avoid scanning the whole document repeatedly.
  • A site's Content Security Policy blocks something your script does. What are your options? Move the work into the service worker or an extension page, which follow the extension's own policy rather than the page's, and pass the result back by message.
  • How do you limit a content script to the right pages? Narrow match patterns, exclude patterns for areas you must not touch, and a runtime check before doing anything costly.
  • When would you inject code into the page's own JavaScript world, and what are the risks? Only when you must touch page variables; the code then runs with the page's privileges and anything it exposes can be read by the page.

Security and privacy questions

  • How do you keep an extension safe from malicious pages? Treat every message from a content script as untrusted, validate the sender, never pass page data to eval or innerHTML, and keep privileged work in the service worker.
  • Why is remotely hosted code not allowed, and how do you ship features without it? Reviewers must see all code; ship logic in the package and fetch only data or configuration.
  • How do you handle API keys and user tokens? Keep secrets on your server, use short-lived tokens for users, and store them with the least exposure possible.
  • What user data can an extension collect? Only what the single purpose needs, disclosed accurately in the store listing and privacy policy, and never sold or used for unrelated purposes under the store's data rules.
  • How would you respond if your extension were found leaking browsing data? Stop the leak in an update, assess what was exposed, inform users and the store as required, and review how it slipped through.

Publishing, testing and maintenance questions

  • What can delay or fail a Chrome Web Store review? Broad permissions without clear need, unclear single purpose, missing privacy disclosures, obfuscated code or misleading listings.
  • What happens if an update adds a new permission? Users may see a new warning, and in some cases the extension is disabled until they accept, so plan permission changes carefully and consider optional permissions.
  • How do you test an extension? Unit tests for logic, then end-to-end tests that load the unpacked extension in a Chromium browser with a tool such as Puppeteer or Playwright, plus manual checks on the sites you target.
  • How do you debug the service worker, popup and content scripts? Each has its own DevTools: the extensions page for the worker, inspecting the popup, and the page's DevTools for content scripts.
  • How would you support Firefox, Edge or Safari too? Use the shared WebExtensions APIs, a small compatibility layer for differences, and separate builds where manifests differ. Test each browser's review rules.
  • How do you roll out a risky change? Ship behind a remote flag that only switches data-driven behavior, watch error reports, and keep the previous version ready.

Fictional example

Answering "Tell me about a hard extension bug you fixed"
Our extension added a notes panel to a project management web app. After the move to Manifest V3, users reported that notes sometimes failed to save if they had been idle. The bug only happened after several minutes, so it never showed up in quick manual tests. I logged service worker start and stop events and saw that the worker was shutting down while idle, and our save queue lived in a global array, so pending saves vanished. I moved the queue into chrome.storage.session, registered every listener at the top level, and had the worker flush the queue whenever it started. I also added an end-to-end test that waited out the idle period before saving. The reports stopped after the next release. The lesson I took was to treat the worker as something that can disappear between any two events.

A one-week preparation plan

  1. Days 1 and 2: build a small extension from scratchA popup, a content script and a service worker that pass messages and save to storage. Break it on purpose by waiting for the worker to stop.
  2. Day 3: read the platform docsManifest V3 overview, permissions, messaging, the service worker lifecycle and the store's program policies. Note anything that changed recently.
  3. Day 4: JavaScript fundamentalsPromises and async functions, the event loop, closures and DOM events. Solve a few small exercises out loud.
  4. Day 5: security and privacyPrepare answers on untrusted messages, secrets, data collection and permission choices.
  5. Days 6 and 7: stories and questionsThree stories from extensions or web apps you built, and questions about the team's release and review process.

Platform questions reward clear, ordered explanations, such as walking through what happens when a worker wakes up. Natively, an AI interview assistant for Mac and Windows, can read a coding prompt from a screenshot during practice and suggest an approach, and it transcribes your mock interview so you can see where your explanation of the lifecycle got tangled. With Pro or the free trial it also uses your résumé and the job description you add. Each practice session is saved with notes.

Questions people ask

What questions are asked in a Chrome extension developer interview?

Expect questions on the parts of a Manifest V3 extension, the service worker lifecycle, content scripts and the isolated world, message passing, storage, permissions and activeTab, security with untrusted pages, Chrome Web Store review, plus JavaScript fundamentals and often a take-home exercise.

Why does background state disappear in a Manifest V3 extension?

The background service worker can be stopped when idle and restarted on the next event, which clears global variables. Keep state in chrome.storage, register listeners at the top level and use the alarms API instead of timers.

What changed between Manifest V2 and Manifest V3?

Background pages became service workers, most request blocking moved to declarativeNetRequest, remotely hosted code is not allowed, and host permissions are declared separately from API permissions.

How should I prepare for a browser extension developer interview?

Build a small extension with a popup, content script and service worker that exchange messages and save to storage, read the current Manifest V3 and store policy docs, and practise explaining permissions and the worker lifecycle out loud.

Where to go next

Practice with the same assistant you would use on a call: it listens, transcribes and suggests answers from your own resume and the job description.

Facts on this page were last checked on . Product details come from the Natively app itself; if something here is out of date, tell us at hello@heynatively.com.

Keep reading

Put it on your own machine.

A live-conversation assistant that runs locally. Your conversations stay on your machine.

macOS 12+ · Windows 10/11

© 2026 Natively AI Private Limited

Source-available under the Natively Personal Use Source License v1.0 · IP geolocation by DB-IP