SWFAddress、后退按钮

发布于 2024-09-25 04:16:47 字数 95 浏览 0 评论 0原文

当用户按下浏览器后退按钮时,SWFAddress 可以“感知”吗?

我知道它可以触发 EXTERNAL_EVENTS,但是......它对特定按钮执行此操作吗?

Can SWFAddress "sense" when a user has pressed the browser back button?

I know it can fire off EXTERNAL_EVENTS, but...does it do this for specific buttons?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

贪了杯 2024-10-02 04:16:47

事实并非如此,swfaddress 对用户按下后退按钮的唯一感知是浏览器地址栏中的地址发生变化(由 javascript 中的 window.location 对象表示)。它通过定期检查 window.location 对象来检测该更改。

当 window.location 对象发生更改,但 swfaddress 未触发地址更改时,它会触发 EXTERNAL_CHANGE 事件。这可能是由于用户在位置栏中输入新的锚点、点击后退/前进按钮或其他一些原因造成的。没有办法做一些像在浏览器的后退按钮上放置事件侦听器这样的事情。

Not really, the only awareness that swfaddress has of the user pressing the back button is that the address in the browser's location bar changes (represented by the window.location object in javascript). It detects that change by checking the window.location object on a regular interval.

When the window.location object changes, but swfaddress didn't trigger the address change, it fires an EXTERNAL_CHANGE event. This could be caused by the user typing in a new anchor into the location bar, hitting the back/forward buttons, or several other things. There's no way to do something like putting an event listener on the browser's back button.

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