Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. <script>
  2. {% comment %}$(window).on('popstate', function() {
  3. console.log("aaaa");
  4. });{% endcomment %}
  5. window.addEventListener('popstate', function () {
  6. alert(1);
  7. });
  8. {% comment %}
  9. window.setTimeout(function() {
  10. window.addEventListener('popstate', function() {
  11. alert(111)
  12. });
  13. }, 1000);
  14. {% endcomment %}
  15. {% comment %} history.pushState(null, null, location.href);
  16. window.onpopstate = function () {
  17. history.go(1);
  18. alert(11)
  19. };{% endcomment %}
  20. {% comment %} window.addEventListener('popstate', function(event) {
  21. alert( "triggered" );
  22. });{% endcomment %}
  23.  
  24. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement