google chrome extension :: console.log() from background page?

后端 未结 11 1952

If I call console.log(\'something\'); from the popup page, or any script included off that it works fine.

However as the background page is not directly

11条回答
  •  -上瘾入骨i
    2020-11-30 17:52

    const log = chrome.extension.getBackgroundPage().console.log;
    log('something')
    

    Open log:

    • Open: chrome://extensions/
    • Details > Background page

提交回复
热议问题