Okiba / EventManager
A custom events management system
Installation
npm i --save @okiba/event-manager
Or import it directly in the browser
<script type="module" src="https://unpkg.com/@okiba/event-manager/index.js"></script>
Usage
import EventManager from '@okiba/event-manager'
Untranspiled code 🛑
Okiba UI packages are not transpiled, so don't forget to transpile them with your favourite bundler.
For example, using Babel with Webpack, you should prevent imports from okiba to be excluded from transpilation, like follows:
{
test: /\.js$/,
exclude: /node_modules\/(?!(@okiba)\/).*/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env']
}
}
}
Submodules:
A singleton to manage centralized event listeners
A base class that defines a global event handler interface
An handler class aimed to centralize a native browser event listener
An handler class aimed to centralize a requestAnimationFrame