So I am using the History API and I am trying to use the pushState() function :
I did this:
history.pushState({'a': 'b'}, 'Document', "index2.html");
It gives me this error:
Uncaught DOMException: Failed to execute 'pushState' on 'History': A history state object with URL '...' cannot be created in a document with origin 'null' and URL '...'.