Library: Additional Window History-Stack Events (pushstate, replacestate)

Complementing the DOM Window 'popstate' event, this library adds the 'pushstate' and 'replacestate' events and corresponding event handlers ('onpushstate', 'onreplacestate').

Från och med 2022-06-14. Se den senaste versionen.

Detta skript bör inte installeras direkt. Det är ett bibliotek för andra skript att inkludera med meta-direktivet // @require https://update.greasyfork.org/scripts/425774/1060693/Library%3A%20Additional%20Window%20History-Stack%20Events%20%28pushstate%2C%20replacestate%29.js

Skapare
sidneys
Version
0.1.2
Skapad
2021-05-01
Uppdaterad
2022-06-14
Size
2,18 KB
Licens
N/A

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