Library: Additional <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.

目前為 2022-06-14 提交的版本,檢視 最新版本

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.cn-greasyfork.org/scripts/425774/1060686/Library%3A%20Additional%20%3Cwindow%3E%20History-Stack%20Events%20%28pushstate%2C%20replacestate%29.js

作者
sidneys
版本
0.1.0
建立日期
2021-05-01
更新日期
2022-06-14
尺寸
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