npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

inputevent

v0.0.3

Published

Alleviate browser bugs for input events

Downloads

61

Readme

inputevent

Alleviate browser bugs for input events

Travis build status

The 'input' event

The 'input' event is awesome. It's triggerred when an input is modified. At least it's meant to. All browsers currently have some circumstances where they fail to trigger it. See here for a nice summary.

The inputevent library

This library alleviates this by firing the missing 'input' events when needed.

Usage

  • load the library

  • call inputevent.install()

What's pretty cool

Auto detection

Iit correctly detects what needs to be patched for all browsers, including future versions that hopefully will fix their behavior

Instead of targetting particular versions of browser, we listen for the first 'input' or 'change' event triggerred for the problematic types of inputs.

If an 'input' event is received first, all is well. Otherwise, we listen for future 'change' events and trigger a corresponding 'input' event each time.

Short

It's about 50 lines of code.

What's less cool

Event order

In browsers that we "fix", the 'input' event happens after the 'change' event instead of before.

JS events

We make a best effort to distinguish between native events and those triggered by JS code.

We ignore non-native events completely, so if you trigger a 'change' event with JS code for a "fixed" type of input, we won't trigger an 'input' event. Thanks to incomplete support for event.isTrusted in Chrome / Safari / Opera, events that are triggeried via JS and not using jQuery may not be distinguished though.

Similarly, triggering a 'change' or an 'input' event with JS code (not using jQuery and with a browser not supporting isTrusted), before an actual user interaction happens, could fool the detection code into erroneously thinking that the browser needs (or doesn't need) "fixing".