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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:16:00+00:00 2026-06-18T15:16:00+00:00

I have a chrome extension that im making for my site, currently i have

  • 0

I have a chrome extension that im making for my site, currently i have the extension checking the database every minute for updates.

Is it possible to have the extension listen for an event on the actual page?

Something like this

this.trigger('sendUpdate', data) //this happened on the page

this.on(sendUpdate, function(){ //this is what the chrome extension listens for
    //do stuff with data
})
  • 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-06-18T15:16:02+00:00Added an answer on June 18, 2026 at 3:16 pm

    you need to add a content_script.

    content_script have full access to the DOM and you can bind to all events on page

    just add this to the menifest file

    "content_scripts":[{
        "matches":["http://*/*","https://*/*"],
        "js":"your injected script.js"
    }]
    

    Read the documentation here

    Also, from your question, it looks like you going to be working with a custom event so your content_scrip js is going to be something similar to this

    document.addEventListener('yourEventName', function(e){
       //send message to ext
       var someInformation = {/*your msg here*/}
       chrome.extension.sendMessage(someInformation, function(response) {
          //callback
       });
    }, false);
    

    The background page should listen for a message.

    chrome.extension.onMessage.addListener(function(myMessage, sender, sendResponse){
        //do something that only the extension has privileges here
        return true;
     });
    

    Then you can trigger the Event from all scripts on the page…

    var evt = document.createEvent('Event');
    evt.initEvent('yourEventName', true, true);
    var some_element = document;
    some_element.dispatchEvent(evt);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to have a Chrome extension listen for the appearance of a
I have a Chrome extension that has some links in it. Currently when clicked
I am making a chrome extension and I have a popup.html page that contains
So, I have a chrome extension that does various things to a site. What
I have a chrome extension which makes some changes on the site (editing comments).
I am making a Google Chrome extension and I would like to have my
I have some sensitive Javascript in a Chrome Extension that I do not want
I have a chrome extension that I built that leaks memory. I am working
I have a chrome extension that uses the facebook Graph API Because its a
I have a chrome extension that I want to port to firefox. In chrome,

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.