-
Notifications
You must be signed in to change notification settings - Fork 181
Open
Description
I have modified the firePopState method by adding a Map, which keeps the URL and state of object in case of IE/Edge.
function firePopState(currentUrl) {
var o = document.createEvent ? document.createEvent('Event') : document.createEventObject();
var currentUrl = currentUrl;
var NextUrl = windowLocation.href;
if (o.initEvent) {
o.initEvent('popstate', false, false);
} else {
o.type = 'popstate';
}
if (historyMap[NextUrl]) {
o.state = historyMap[NextUrl];
delete historyMap[NextUrl];
historyObject.replaceState(null, "", NextUrl);
} else {
historyMap[currentUrl] = historyObject.state;
}
// o.state = historyObject.state;
// send a newly created events to be processed
dispatchEvent(o);
}
Please suggest.
Metadata
Metadata
Assignees
Labels
No labels