Answer the question
In order to leave comments, you need to log in
How to connect popup.html and background extensions?
The extension has a background or content script, I need to get data from there or send data there using popup.html, how can I do this? I know XmlHttpRequest can do this, but are there built-in API's for this?
Answer the question
In order to leave comments, you need to log in
There are a lot of options with intermediate storage: in the background DOM element, in localStorage, in indexedDB, in appCache. And you can track events for WebWorker.
Load popup.html at the end and jquery for convenience
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="background.js"></script>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question