New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

popstate

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

popstate

Listen on popstate history events with Safari compatibility

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

popstate Build Status

Listen on popstate history events with Safari compatibility

Old versions of Chrome and all versions of Safari emit popstate events on page load (MDN). popstate defers registration of the event listener to avoid double-calls.

Install

$ npm install --save popstate

Usage

var popState = require('popstate')

popState(function (event) {
  //=> popped state  
})

API

popState(callback) -> undefined

callback

Required
Type: function

A callback to safely register for popstate events.

License

MIT © Ben Drucker

Keywords

history

FAQs

Package last updated on 09 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts