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,819
  • 4
  • 23
  • 36

1 Answers1

0

In popup.js :

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

Also messaging can be used as described here

Sarasranglt
  • 3,819
  • 4
  • 23
  • 36