https://github.com/aegisjsproject/callback-registry
A callback registry for AegisJSProject
https://github.com/aegisjsproject/callback-registry
aegis callback-registry declarative-dom event-binding
Last synced: 3 months ago
JSON representation
A callback registry for AegisJSProject
- Host: GitHub
- URL: https://github.com/aegisjsproject/callback-registry
- Owner: AegisJSProject
- License: mit
- Created: 2024-11-16T23:51:21.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-04-10T17:44:31.000Z (about 1 year ago)
- Last Synced: 2025-04-10T18:58:02.775Z (about 1 year ago)
- Topics: aegis, callback-registry, declarative-dom, event-binding
- Language: JavaScript
- Homepage: https://npmjs.com/package/@aegisjsproject/callback-registry
- Size: 477 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# `@aegisjsproject/callback-registry`
A template repo for npm packages
[](https://github.com/AegisJSProject/callback-registry/actions/workflows/codeql-analysis.yml)


[](https://github.com/AegisJSProject/callback-registry/blob/master/LICENSE)
[](https://github.com/AegisJSProject/callback-registry/commits/master)
[](https://github.com/AegisJSProject/callback-registry/releases)
[](https://github.com/sponsors/shgysk8zer0)
[](https://www.npmjs.com/package/@aegisjsproject/callback-registry)


[](https://www.npmjs.com/package/@aegisjsproject/callback-registry)
[](https://github.com/shgysk8zer0)


[](https://twitter.com/shgysk8zer0)
[](https://liberapay.com/shgysk8zer0/donate "Donate using Liberapay")
- - -
- [Code of Conduct](./.github/CODE_OF_CONDUCT.md)
- [Contributing](./.github/CONTRIBUTING.md)
A lightweight, modular JavaScript library for managing DOM events and callbacks. The library is designed for flexibility and efficiency, with a focus on leveraging modern JavaScript standards.
## Features
- **Callback Management**: Centralized registration and retrieval of reusable callback functions.
- **Event Handling**: Simplified DOM event binding with support for custom attributes (e.g., `data-aegis-event-on-*`).
- **Custom Events**: Easily define and trigger application-specific events.
- **Declarative Attributes**: Leverages custom data attributes for declarative event configuration.
## Installation
```bash
npm install @aegisjsproject/callback-registry
```
## Example usage
```js
import { createCallback, observeEvents, EVENTS } from '@aegisjsproject/callback-registry';
observeEvents();
const el = document.querySelector('.container');
el.setHTMLUnsafe(` alert(target.innerHTML))}">Hello, World!`);
```