So I'm trying to load a webpage in a node environment with JSDOM. The webpage makes use of localStorage.
I'm loading the webpage through file system using JSDOM's url config option. JSDOM gives me the following error:
Error: Uncaught [SecurityError: localStorage is not available for opaque origins]
It gives this error if document.origin is set to null. I have no clue how to set origin using this setup. Can anyone help me out?
I have prepared a sandbox with the exact error here
Thanks in advance!