0

So I want to make my chrome extension appear out like a pop-up . Is that possible ? As I cant handle the data from background script to popup.html as the chrome extension would not be rendered yet. background script

chrome.runtime.onMessage.addListener(
    function(request, sender, sendResponse) {
        if (request.greeting == "hello"){
            createTable(request.message);
        }
        return true;
    });

request.message can be accessed but cant be added to the chrome extension

siri
  • 11
  • 3
  • First you need to clarify what exactly is that "pop-up" and how it should look. Also there may be an entirely different solution depending on what that "data" is and how you want to handle it. – wOxxOm Jul 24 '19 at 07:03
  • This is the situation. I am taking some data from the website and sending it to the extension's javascript (background.js) but the extension DOM chrome.runtime.onMessage.addListener( function(request, sender, sendResponse) { if (request.greeting == "hello"){ createTable(request.message); } return true; }); , the request. message has the data i want but i cant add it to the chrome extension as it not rendered yet. – siri Jul 24 '19 at 08:45
  • So i thought of taking my chrome out as a pop-up box . – siri Jul 24 '19 at 08:48
  • @siri I think this is exactly what you need https://stackoverflow.com/q/20019958/6141587 – deadcoder0904 Jul 24 '19 at 09:41

0 Answers0