SHARE
TWEET

Untitled

a guest Jun 20th, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. document.getElementById('target').addEventListener('click', e => {
  2.     //Change some visuals
  3.     let state = { //some state },
  4.         title = "new page",
  5.         path  = "new-page";
  6.     history.pushState(state, title, path);
  7. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top