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

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

  •  
  •   bsg1992 · Mar 15, 2021 · 2505 views
    This topic created in 2064 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
    bsg1992
    bsg1992
    OP
    Mar 17, 2021
    3
    @eason1874 已解决 谢谢了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   753 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 17:33 · PVG 01:33 · LAX 09:33 · JFK 12:33
    ♥ Do have faith in what you're doing.