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

网页如何与 Chrome 扩展进行通信呢?

  •  
  •   bsg1992 · Mar 15, 2021 · 2226 views
    This topic created in 1910 days ago, the information mentioned may be changed or developed.
    写了一个扩展程序,网页现在需要调用扩展里的一些数据进行交互。
    Chrome 文档 上有一个 chrome.runtime.sendMessage 可以根据扩展程序的 id 进行消息的发送和回传。
    但是在普通网页里无法进行使用这个对象。
    3 replies    2021-03-17 09:19:32 +08:00
    eason1874
        1
    eason1874  
       Mar 15, 2021   ❤️ 1
    bsg1992
        3
    bsg1992  
    OP
       Mar 17, 2021
    @eason1874 已解决 谢谢了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   834 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 20:36 · PVG 04:36 · LAX 13:36 · JFK 16:36
    ♥ Do have faith in what you're doing.