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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@teyostudios/sync-event-listener

v0.1.0

Published

Synchronize your existing events, over downloaded html content with ajax

Downloads

2

Readme

SyncEventListener

SyncEventListener, is a small tool, which helps to assign js events to DOM objects dynamically loaded with Ajax.

When you create a new html object with js, it has no events. For example, if you have a list, and this list has create, edit, delete buttons, and you create a new row with js, the buttons in this row will not have the events unless you add them by hand.

With Sync Event Listener these events that need to be added on new elements, are added to the elements with a new function (instead of with addEventListener), and these events are added dynamically, just by calling a function after creating the new ones. html elements.

Starting 🚀

To use it you only need to import the module where you need it, and assign the events with the module, instead of using addEventListener.

See Deployment to know how to deploy the project.

Pre-requirements 📋

There are not pre requirements

Installation 🔧

Just install the last version

npm install @teyostudios/sync-event-listener --save

Deployment 📦

Import in your js

import SyncEventListener from @teyostudios/sync-event-listener;

If you prefer a shorter name

import SyncEventListener as customName from @teyostudios/sync-event-listener;

There are just 2 functions:

  • sync : to add all events synced with addDynamicEvent()
  • addDynamycEvent : to synchronize events to be added after sync()

Add Events

addDynamycEvent (type, query, callback)

type String - Js type of event (click, input, focusin,...) query String - DOM document.querySelector query. Ej: (".classname" , "#identifier", ".classname .otherclassname") callback function - The function that will be executed when the event is triggered

Ej:

SyncEventListener.addDynamycEvent("click", ".saveButton", sendData);

sync

When with js create a new object, add the synchronized events with Sync()

SyncEventListener.sync();

Build With 🛠️

PureJs

Versioned 📌

We use SemVer for versioning. For all available versions, loot at the tags in this repository

authors ✒️

Licence 📄

This project is under the MIT licence - see the file LICENSE.md for more details.

If you liked it and it was useful 🎁

  • Tell others about this project 📢
  • Invite to a coffee ☕ or a beer 🍺.
  • Give thanks 🤓.

⌨️ con ❤️ por TeyoStudios 😊