Skip to content

romeobravo/pathfinder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Watchers

Forks

Releases

No releases published

Packages

No packages published