after my several test and check, popup js can directly invoke function from background page with method chrome.extension.getBackgroundPage. But the template compile the background js into a webpack style data structure that my global custom method in src/background.js complied into a webpack scope。so this is annoyed for me to find such a silly problem... Is there some way to directly get Background page to invoke the background function ... I'm not willing to use onMessageto listen for the message from popupjs and run method
after my several test and check, popup js can directly invoke function from background page with method
chrome.extension.getBackgroundPage
. But the template compile the background js into a webpack style data structure that my global custom method insrc/background.js
complied into awebpack scope
。so this is annoyed for me to find such a silly problem... Is there some way to directly get Background page to invoke the background function ... I'm not willing to useonMessage
to listen for the message from popupjs and run method