Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- {% comment %}$(window).on('popstate', function() {
- console.log("aaaa");
- });{% endcomment %}
- window.addEventListener('popstate', function () {
- alert(1);
- });
- {% comment %}
- window.setTimeout(function() {
- window.addEventListener('popstate', function() {
- alert(111)
- });
- }, 1000);
- {% endcomment %}
- {% comment %} history.pushState(null, null, location.href);
- window.onpopstate = function () {
- history.go(1);
- alert(11)
- };{% endcomment %}
- {% comment %} window.addEventListener('popstate', function(event) {
- alert( "triggered" );
- });{% endcomment %}
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement