Greasy Fork

Library: DOM Window History Stack Events (pushstate/replacestate)

To complement the <window> 'popstate' event, this library adds the 'pushstate'/'replacestate' events to <window>. Also adds corresponding 'onpushstate'/'onreplacestate' event handlers.

目前为 2021-05-01 提交的版本。查看 最新版本

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.greasyfork.icu/scripts/425774/926822/Library%3A%20DOM%20Window%20History%20Stack%20Events%20%28pushstatereplacestate%29.js

作者
sidneys
版本
0.0.9
创建于
2021-05-01
更新于
2021-05-01
大小
2.2 KB
许可证
暂无

Library

DOM Window History Stack Events (pushstate/replacestate)

  • Complement the 'popstate' event
  • Emits a pushstate event from window by Monkey-Patching History#pushState
  • Calls corresponding window#onpushstate event handler
  • Emits a replacestate event from window by Monkey-Patching HistoryreplaceState
  • Calls corresponding window#onreplacestate event handler