I'm trying to build a chrome extension that would feed data in the localStorage
of the form:
var a = 'YouTube';
var data = {
'title': 'twenty one pilots: Stressed Out [OFFICIAL VIDEO]',
'url': 'https://www.youtube.com/watch?v=pXRviuL6vMY'
};
localStorage.setItem(a, data);
But when I look into the resources in dev. tools, it doesn't show the data
object in the value table. How can I make it appear in there?What's wrong with the code?
The Image of the console and the localStorage.
I have tried commands like localStorage.YouTube
and localStorage.getItem('YouTube')
but it always returns [object Object]
.
What could be a possible workaround for making something like this possible?