当 iframe 更改源时 Pathjs 主题标签路由不起作用

发布于 01-08 09:38 字数 188 浏览 4 评论 0原文

我使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

箹锭⒈辈孓2025-01-15 09:38:49

我只是将 iframe 与 dom 分离,切换 src,然后重新附加它。德普。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文