📜  单独下载 chrome 扩展,然后添加到 chrome - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:01.889000             🧑  作者: Mango

代码示例1
Fast-forward 3 years, and now Google Chrome offers chrome.downloads API (since 
Chrome 31).

After declaring "downloads" permission in the manifest, one can initiate a 
download with this call:

chrome.downloads.download({
  url: "http://your.url/to/download",
  filename: "suggested/filename/with/relative.path" // Optional
});