like this

Need the download bar like chrome
You can try with chrome.downloads API. See https://developer.chrome.com/extensions/downloads. If it doesn't work, please feedback here.
ok,I will try now

I don't know where is the "permission" should be added.package.json?
like this

@ghostoy
There is no need to set permission in package.json. If chrome.downloads doesn't work without the permission, we will seek to fix it.
chrome.downloads.download is ok to run.But chrome.downloads.onChanged.addListener will cause the result that file download failed.
test code
const chrome = window.chrome;
if(chrome && chrome.downloads) {
chrome.downloads.onChanged.addListener(({id, state={}, error}) => {
console.log(id, state);
if(state.current === chrome.downloads.State.COMPLETE) {
chrome.downloads.show(id);
}
})
}
chrome.downloads..download was runned after chrome.downloads.onChanged.addListener
Oh sorry.I find it ok when run the code again.
But I don't catch the method or any properties to show download bar in chrome extension api
Yes, there is no download UI for it. You can implement your own.
BTW, you can use Node.js APIs to download files as well. But chrome.downloads can intercept the downloads initiated from web page.
I find another way to solve my problem.I can use chrome.downloads.onChanged.addListener to listen to my download percentange and show it on a message modal.Thank you. @ghostoy
怎么解决?
Most helpful comment
You can try with
chrome.downloadsAPI. See https://developer.chrome.com/extensions/downloads. If it doesn't work, please feedback here.