0

I need to call a method in background.js from popup.js . Example :

Background js:

function abc(){

}

Popup js :

abc(); //call from here
Sarasranglt
  • 3,651
  • 4
  • 20
  • 35

1 Answers1

0

In popup.js :

var BGPAGE = chrome.extension.getBackgroundPage();
BGPAGE.abc();

Also messaging can be used as described here

Sarasranglt
  • 3,651
  • 4
  • 20
  • 35