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

  • SEARCH
  • Home
  • 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 7491229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T15:56:41+00:00 2026-05-29T15:56:41+00:00

I am having problems with my google extension, I have followed what I believe

  • 0

I am having problems with my google extension, I have followed what I believe is proper for sending information to a background page, but when I try to run my extension I am hit with “Uncaught TypeError: Object [object DOMWindow] has no method ‘closer'” Does anyone know what is happening and why?

popup.html

var i = 0;

function start(){

        var bg = chrome.extension.getBackgroundPage();
        bg.closer(i); //chrome.extension.sendRequest({});
}

function add(){

        i++;
        document.getElementById('box').value=i;
}
function sub(){

        i--;
        document.getElementById('box').value=i;
}

background.html

var ctr = 0;

function closer(int i){

        var t=setTimeout("close()",i*500);
}

function close(){

        chrome.tabs.getSelected(null, function(tab) {
            chrome.tabs.remove(tab.id, function() { });
        });
}

manifest.json

{

    "name": "Hello World!",
    "version": "1.0",

    "description": "My first Chrome extension.",

    "permissions": ["tabs", "background"],

    "background_page": "background.html",

    "browser_action": {
    "default_icon": "icon.png",
    "popup": "popup.html"   
    }
}
  • 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-29T15:56:42+00:00Added an answer on May 29, 2026 at 3:56 pm

    you cannot just send message to that bg variable.

    There is a special approach to send messages to bg, please read up on sendRequest() etc.

    http://code.google.com/chrome/extensions/extension.html#method-sendRequest

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making a small project in Google AppEngine but I'm having problems with international
I have a basic Google Chrome Extension I am working on, and having a
I am having problems using django-tagging . I try to follow the documentation but
I'm having problems with google maps, drawing icons was working fine few weeks ago
I am having problems with the google maps API V3. It seems that every
I am having problems while saving a pre-persisted JDO object in google-app-engine data store.
I was having problems with the DOM since elemnets inside of google visualization tables/graphs
I'm having some problems trying to figure out how to generate a Google Map
I'm having some problems with the resize of the Google Maps JavaScript API v3.
I am having a problem with the Google annotated timeline. I have this function

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.