• 请不要在回答技术问题时复制粘贴 AI 生成的内容
Features
V2EX  ›  程序员

请教下 chrome 插件的 downloads api 问题

  •  
  •   Features · May 12, 2022 · 1868 views
    This topic created in 1650 days ago, the information mentioned may be changed or developed.
    搜了一下网上的资料太少了
    我尝试做个图片下载工具
    使用 chrome.downloads.download 一直提示未定义,是这个接口变更了吗?
    还是说我哪里没配置好?


    manifest 清单文件
    2 replies  •  2022-05-12 17:32:37 +08:00
    caqiko
    caqiko
    May 12, 2022 via Android❤️1
    1
    可能因为 content script 不支持这个 API ,要在 background 里调用
    Features
    Features
    OP
    May 12, 2022
    2
    @caqiko 是的,这个 API 无法在 content 中使用,可以在 popup 或者 background 中使用
    非常感谢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2527 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 10:54 · PVG 18:54 · LAX 02:54 · JFK 05:54
    ♥ Do have faith in what you're doing.