Listeners in Experimental apis

Sounds like you want to send message to your background script to execute that function. Something like: browser.runtime.sendMessage({type: 'executeXYZ', parameters: ['a', 'b', 'c']}).
See this related topic: