I am developing an extension which shows some values in popup. The values are fetched in event page script periodically.
function load() {
var value = fetch();
// I would like to set this value to popup content.
}
chrome.alarms.onAlarm.addListener(function(alarm) {
if (alarm.name === "refresh") {
load();
}
});
chrome.alarms.create("refresh", {"periodInMinutes": 10});
I tried to get the popup window to change its content using chrome.extension.getViews({ViewType: "popup"})
in event page script but it returned an empty array.
I know I can do it using storage but it seems to me overkill.
So how can I use the value in popup?