Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pathfinder

JS Event Emitter for browser navigation

Listens to window.click and window.popstate events for url navigation. Pathfinder will emit an event or callback for all internal navigation and prevents default behaviour for clicking a link.

npm install https://github.com/romeobravo/pathfinder

Examples

import Pathfinder from 'pathfinder'

const CHANGE = 'change'

pathfinder = new Pathfinder({
  event: CHANGE
})

pathfinder.on(CHANGE, function() {
  alert('navigation detected')
})

babel ./pathfinder.js --out-file ./lib/pathfinder.js --presets es2015

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages