Neverending Programming Mistakes

properjs-pushstate

0.3.4 • Public • Published

PushState

Handles history pushstate/popstate.

Installation

npm install properjs-pushstate --save-dev

Usage

var PushState = require( "properjs-pushstate" ),
    pushstate = new PushState({
        // Defaults:
 
        // Force Hash state instead ( false by default )
        forceHash: true
    });
 
pushstate.on( "popstate", function ( url, state ) {
    // Handle pop
    // state.uid
});
 
// Push state to address bar
pushstate.push( url );
 
// Go back in history
pushstate.goBack();
 
// Go forward in history
pushstate.goForward();

install

npm i properjs-pushstate

Downloadsweekly downloads

14

version

0.3.4

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability