I'm trying to access the local storage of the chrome extension ergo the chrome browser within my vue.js component.
ServerList.vue
<template>
<div>
<server-list :server-descriptions="serverDescriptions"/>
</div>
</template>
<script>
import ServerList from "./ServerList.vue"
chrome.storage.sync.set({'foo': 'hello', 'bar': 'hi'}, function() {
console.log('Settings saved');
});
chrome.storage.sync.get(['foo', 'bar'], function(items) {
console.log('Settings retrieved', items);
});
[...]
</script>
This code is within my popup.html and this is what the console of the popup.html inspection tells me this:
Therefore I assumed it did work. But when I check the local storage through the debugger tab I see nothing:
Even checking localStorage
in the console manually does not show me anything:
Therefore I assume the data is not persistet in my chrome browser?
Does anybody know how I can get this to work? Or give me a hint?