Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4232696
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T02:07:39+00:00 2026-05-21T02:07:39+00:00

I am learning how to extend Google chrome and I have run into the

  • 0

I am learning how to extend Google chrome and I have run into the following problem:

I have the following manifest file:

{
    "name": "My First Extension",
    "version": "1.0",
    "description": "The first extension that I made.",
    "background_page": "background.html",
    "browser_action": {
        "default_icon": "icon.png", 
        "popup": "popup.html"
     },
    "permissions": [
    "tabs",
        "http://*/*",
        "https://*/*"
    ]
 }

My background.html file just injects some simple JavaScript into the page:

<script>
    // Called when the user clicks on the browser action.
    chrome.browserAction.onClicked.addListener(function(tab) {
        chrome.tabs.executeScript(null, {code:"alert(\"hi from background CODE\");"});
    });
</script>

My popup.html file is just simple HTML:

<body>
    Sup Playa
</body>

The dialog box from background.html never gets displayed. popup.html functions as expected.

However when I comment out popup.html from the manifest file, the script in background.html works.

What am I doing wrong? Why aren’t both the dialog box and the popup showing up?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T02:07:40+00:00Added an answer on May 21, 2026 at 2:07 am

    As it says in the docs:

    onClicked event will not fire if the browser action has a popup.

    So if you assign any html file to your popup "popup": "popup.html" (rather than just a button without body), onClicked event isn’t fired.

    You can just put your code right into popup.html (it has same privileges as a background page) if you want something to be executed each time it is opened:

    chrome.tabs.executeScript(null, {code:"alert(\"hi from background CODE\");"});
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So, I'm learning C++, and I've run into something which I know how to
I'm fairly new to WCF development and have run into a couple problems whilst
I remember first learning about vectors in the STL and after some time, I
I´ve just started learning GWT and I´m trying to implement http://gwt.google.com/samples/Showcase/Showcase.html#!CwFileUpload and but failing
I'm learning how to extend Java classes in Clojure, but I don't see a
First off, please forgive me for my lack of understanding... I'm still learning :)
I'm learning how to write a scriptable ActiveX control. My goal is to have
I'm learning OSGi and I'm curious about the following situation: I want to change
Am learning AppEngine and have started developing new app and want to clarify something.
I will need a Sharepoint Server 2010 install for learning purposes.. I already have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.