sessionStorage between parent and child pop-up
I have an HTML5 page where I store some data with:
window.sessionStorage.setItem('toStore', 'hello world');
Then, I open from this window a pop-up one with:
window.open('mobile.html', 'myPopUp');
I have a set of Javascript functions associated to the two pages, where I want to access the local storage da开发者_StackOverflow中文版ta of parent page from the popUp with the getItem('toStore')
call.
Is that possible? If yes, what's the calling syntax?
Thanks
Converting comment to answer.
window.opener.sessionStorage.setItem('toStore', 'hello world');
精彩评论