当 iframe 更改源时 Pathjs 主题标签路由不起作用
我使用 pathjs 进行主题标签路由。 它工作得很好,但如果我更改 iframe 的 src 属性,它就会被视为历史记录项,并且单击后退按钮会将其 src 切换回来。我不希望这算作一个新的状态。如何忽略更改 iframe 的 src?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

我只是将 iframe 与 dom 分离,切换 src,然后重新附加它。德普。
I simply detached the iframe from the dom, switched the src, then reattached it. Derp.