Q: Manipulation DOM with Chrome Extension in my Chrome Extension with a popup I want to open a certain number of tabs and after loading I want manipulate the DOM with variables.
I can open the tabs but I cannot find a way to send my data to tab.
Maybe the better way is to open the Url with the POST method and send the data directly?
popup.js
$(document).ready(function () {
    "use strict";
    $('button').on('click', function () {
        chrome.tabs.create({ windowId: window.id, url: "http://www.url1.com" }
        // manipulate the dom/form data with 2 variables, which are given
        // var1 = xxx and var2 = yyy
        chrome.tabs.create({ windowId: window.id, url: "http://www.url2.com" }
        // manipulate the dom/form data with 2 variables, which are given
        // var3 = 123 and var4 = 678

    });
});


A: Please use postMessage CHROME API for send or receive data between any following scripts.


*

*background.js 

*content_script.js

*popup.js


Please refer following doc for details in details.
https://developer.chrome.com/extensions/messaging
