What I've now tried to replicate:
jsreport 3.1.1
template :
<button id='render'>download</button>
<script>
document.getElementById('render').onclick = async () => {
try {
const report = await jsreport.render({
template: {
content: 'foo', engine: 'none', recipe: 'chrome-pdf',
}
})
await report.download('foo.pdf')
} catch (e) {
console.error(e)
}
}
</script>
If I call it with API, I see in the output this like
<script src="http://localhost:5488/extension/browser-client/public/js/jsreport.umd.js"></script><button...
Opening this HTML as a static file, the button works.
However now I think that the problem will be how you put that HTML result into your application?
If you just open that to the new app, does it work?
What if you add it to iframe?
Could you check the F12 console? Is the jsrepurt.umd.js really properly downloaded? Are there no other errors?