2.0.0 • Published 9 years ago

anima-history v2.0.0

Weekly downloads
3
License
-
Repository
github
Last release
9 years ago

anima-history


An awesome npm package!


Install

$ npm install anima-history --save

Usage

var AnimaHistory = require('Anima-history');
var animaHistory = new AnimaHistory({
  onback: function(hash, current, length, count) {
    console.log('onback:' + hash + '\ncurrent:' + current + '\nlength:' + length + '\ncount:' + count);
    console.log(this.getHistory(), current);
  },
  onforward: function(hash, current, length, count) {
    console.log('onforward:' + hash + '\ncurrent:' + current + '\nlength:' + length + '\ncount:' + count);
    console.log(this.getHistory(), current);
  },
  onreload: function(hash, current, length) {
    console.log('onreload:' + hash + '\ncurrent:' + current + '\nlength:' + length + '\n ');
    console.log(this.getHistory(), current);
  },
  onpush: function(hash, current, length) {
    console.log('onpush:' + hash + '\ncurrent:' + current + '\nlength:' + length + '\n ');
    console.log(this.getHistory(), current);
  },
  ssKey: 'sessionStorage的唯一key'
})
2.0.0

9 years ago

1.0.0

10 years ago