Alex77
V2EX  ›  问与答

开发一个从指定网页拷贝指定文本内容的 Chrome 拓展,不知道怎么从 Pop 页面调用 Context.js 中的函数。

  •  
  •   Alex77 · Nov 27, 2020 · 516 views
    This topic created in 2000 days ago, the information mentioned may be changed or developed.
    自学开发的,问题比较初级,让各位大牛见笑了。
    现在希望实现的功能是:点击 popup 页面中的按钮后,chrome 拓展能实现在网页中拷贝指定的文本内容到粘贴板,获取文本的 JS 函数已经写好,并保存在 Context.js 中,但问题是不知道怎么从 popup 页面中调用这些函数。
    看到网上有些教程,介绍了 popup.js 、context.js 、background.js 之间互相通讯的内容,但没看到如何调用函数的。

    谢谢各位。
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1480 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 17:00 · PVG 01:00 · LAX 10:00 · JFK 13:00
    ♥ Do have faith in what you're doing.