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 3215226
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:09:11+00:00 2026-05-17T15:09:11+00:00

If I call console.log(‘something’); from the popup page, or any script included off that

  • 0

If I call console.log('something'); from the popup page, or any script included off that it works fine.

However as the background page is not directly run off the popup page it is not included in the console.

Is there a way that I can get console.log()‘s in the background page to show up in the console for the popup page?

is there any way to, from the background page call a function in the popup page?

  • 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-17T15:09:11+00:00Added an answer on May 17, 2026 at 3:09 pm

    Any extension page (except content scripts) has direct access to the background page via chrome.extension.getBackgroundPage().

    That means, within the popup page, you can just do:

    chrome.extension.getBackgroundPage().console.log('foo');
    

    To make it easier to use:

    var bkg = chrome.extension.getBackgroundPage();
    bkg.console.log('foo');
    

    Now if you want to do the same within content scripts you have to use Message Passing to achieve that. The reason, they both belong to different domains, which make sense. There are many examples in the Message Passing page for you to check out.

    Hope that clears everything.

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

Sidebar

Related Questions

I have an (console, .NET 3.5, C#) application that I'm trying to call from
So here is my script: $(document).bind('mouseleave', function(event) { // show popup console.log(you are about
I got this from Paul Irish , window.log = function(){ if(this.console){ console.log( Array.prototype.slice.call(arguments) );
This code works, in some cases. If it returns console.log then the call to
$(item).droppable({ drop: function(event, ui) { console.log(triggered); } }); I try to call drop by
I am creating a Console Application, in that I need to Call a Method,
So this is my code: function A(){ var args = Array.prototype.slice.call(arguments); console.log('before unshift: ',
I have a custom logging function to log to the firebug console that looks
I am making an ajax call in jquery $.get(validate_isbn.php, {isbn: obj[16]}, function(answer) { console.log(answer);
I noticed that alert and console.log do not work like normal JavaScript objects in

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.