Alex77
V2EX  ›  问与答

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

  •  
  •   Alex77 · Nov 27, 2020 · 515 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   ·   5746 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 06:18 · PVG 14:18 · LAX 23:18 · JFK 02:18
    ♥ Do have faith in what you're doing.