
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
custom-event-js
Advanced tools
The Custom Event Dispatcher provides the ability to communicate inside your application by dispatching events and listening to them. What is the CustomEvent interface you may find here.
Custom Event Dispatcher works in all popular browsers
npm install --save custom-event-js
yarn add custom-event-js --save
import CustomEvent from 'custom-event-js'
// Listen event 'SHOW_NAME'
CustomEvent.on('SHOW_NAME', (data) => {
console.log(data.detail) // { name: 'GitHub' }
})
// Dispatch event 'SHOW_NAME' with data
CustomEvent.dispatch('SHOW_NAME', { name: 'GitHub' })
// Remove event listener
CustomEvent.off('SHOW_NAME')
// Remove a specific callback from event listener
CustomEvent.off('SHOW_NAME', callback)
on(eventName, callback) add an appropriate event listener. When event gets fired callback will be called with detail argument
dispatch(eventName, detail) dispatch event to all event listeners
off(eventName) remove all event listeners for the event
off(eventName, callback) remove a specific event listener for the event
Any contributions you make are greatly appreciated.
Please read the Contributions Guidelines before submitting a PR.
MIT © Vasyl Stokolosa
FAQs
Custom Event Dispatcher
The npm package custom-event-js receives a total of 33 weekly downloads. As such, custom-event-js popularity was classified as not popular.
We found that custom-event-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.