Search code examples
javascriptjquerybrowser-historyhashtagpath.js

Pathjs hashtag routing not working when iframe changes source


I'm using pathjs for hashtag routing. It's working great, but if I change the src attribute of an iframe, it counts as a history item, and clicking the back button will switch it's src back. I don't want this counting as a new state. How can changing the src of an iframe be ignored?


Solution

  • I simply detached the iframe from the dom, switched the src, then reattached it. Derp.