yoshuawuyts / Nanohistory
Licence: mit
Small browser history library
Stars: ✭ 14
Programming Languages
javascript
184084 projects - #8 most used programming language
nanohistory
Small browser history library. Although you might as well just use the native DOM API (read the source and decide for yourself).
Usage
var nanohistory = require('nanohistory')
nanohistory(function (location) {
console.log('new location is', location)
})
// Trigger the history API a couple of times
window.history.pushState({}, null, '/foo')
window.history.pushState({}, null, '/bar')
API
nanohistory(callback(location))
Register a new history API listener. This will fire whenever the history API is triggered.
License
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].