I didn't use chrome extension but i did the same in different way hope this help you. Here is the code that i used

var blob = new Blob(['dummy content'], {type: 'text/plain'}); var fileName = "dummyprefix.txt"; var pom = document.createElement('a'); document.body.appendChild(pom); pom.style = "display: none"; var url = window.URL.createObjectURL(blob) pom.setAttribute('href', url); pom.setAttribute('download', fileName); pom.dataset.downloadurl = ['text/plain', pom.download, pom.href].join(':'); pom.click(); window.URL.revokeObjectURL(url);

You might need to add checks for Internet Explorer though.