I have a code in a content.js and a background in a chrome extension, the code runs all fine, except the part that makes it download the information I want
part of the code that doesn’t work
content.js
function descargarArchivo(texto, nombreArchivo) {
chrome.runtime.sendMessage({
action: "downloadFile",
data: texto,
filename: nombreArchivo
});
}