This package has been deprecated

Author message:

this version has been deprecated

metaphorjs-history

0.1.2 • Public • Published

#MetaphorJs stateless pushState wrapper/polyfill

3kb minified

without MetaphorJs:

history.initPushState()

history.onChange(function(location){})

history.onBeforeChange(function(location){})

history.pushState(state, title, url) -- state and title are ignored

history.replaceState(state, title, url) -- state and title are ignored

with MetaphorJs:

history.initPushState()

MetaphorJs.on("beforeLocationChange", function(location){})

MetaphorJs.on("locationChange", function(location){})

MetaphorJs.pushUrl(url)

MetaphorJs.replaceUrl(url)

MetaphorJs.currentUrl()

==============

IE6+, Chrome, Firefox, Safari, Opera

If browser does not support pushState, #! will be used.

All links with valid url in href will be subject to pushState handler.

If you want to bypass handler, add target="_self" attribute (or any other target value).

Readme

Keywords

none

Package Sidebar

Install

npm i metaphorjs-history

Weekly Downloads

2

Version

0.1.2

License

MIT

Last publish

Collaborators

  • kuindji