Is there any way I can get the new page's url when the window.popstate
is fired?
window.onpopstate(function (){
newPageUrl = //get the new page's URL
})
Is there any way I can get the new page's url when the window.popstate
is fired?
window.onpopstate(function (){
newPageUrl = //get the new page's URL
})
Share
Improve this question
asked Sep 15, 2016 at 5:15
user6459745user6459745
2
|
1 Answer
Reset to default 23Use this
window.onpopstate = function (){
newPageUrl = location.href;
}
location.href
work? – Alexander O'Mara Commented Sep 15, 2016 at 5:17