How to interact with background.js from the popup?

前端 未结 3 688
無奈伤痛
無奈伤痛 2020-12-04 20:46

Is there any way to pass information between the popup.html (or popup.js) and a background script?

I\'d like the popup to display information from a user\'s account

3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-04 21:02

    For just debugging purposes I find this pretty handy in popup JS:

    console = chrome.extension.getBackgroundPage().console
    

提交回复
热议问题