X
X
xXRustamXx2018-03-01 09:40:01
JavaScript
xXRustamXx, 2018-03-01 09:40:01

When you click on the back button in the browser, you need to print prompt();?

Hello everyone, I can't find event c callback for prompt(); for this action(

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
Nikolai Shabalin, 2018-03-01
@nikolayshabalin

And thank God.

R
RidgeA, 2018-03-01
@RidgeA

Great opportunities come with great responsibility - use with care - https://developer.mozilla.org/en-US/docs/Web/Event...

F
frees2, 2018-03-01
@frees2

Maybe I misunderstood the question, but on the button (both in the browser - the button is back or forward, and on the link if it sends back or forward, walk through the history), you can hang any event, be it text loading or a new script, without difference.

(function(history){ var pushState = history.pushState;
history.pushState = function(state) { if (typeof history.onpushstate == "function")
{history.onpushstate({state: state});} 
return pushState.apply(history, arguments); }})(window.history);
window.onpopstate = history.onpushstate = function(e){ i++; test=JSON.stringify(e.state);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question