ALiangLiang / vue-webpack-chrome-extension-template

Template for quick creation of Chrome extension on Vuejs hot reloading when developing.
MIT License
107 stars 13 forks source link

Some problem about popup.js invoke function from background page #5

Closed johnsoncheg closed 6 years ago

johnsoncheg commented 6 years ago

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