Im injecting a script in webpage via content script. Inside the script I am using chrome.runtime.sendMessage to successfully send a message to background script. However I have the extensionId hardcoded. How would I dynamically inject the extension id in webpage to send messages to background script?
chrome.runtime.sendMessage(extensionIdHardCoded, {
msg: data
},
function(response) {});