@pluginjs/events

0.8.11 • Public • Published

Events

npm package

events is a utility JavaScript library for dom event interface.

Introduction

Installation

Yarn

yarn add @pluginjs/events

NPM

npm i @pluginjs/events

Getting Started

CDN:

Development:

<script src="https://unpkg.com/@pluginjs/events/dist/events.js"></script>

Production:

<script src="https://unpkg.com/@pluginjs/events/dist/events.min.js"></script>

API

trigger

Parameters

| Name | Type | Description | |||-| | event | String or CustomEvent | evnetName or customEvent | | [ extraParams ] | String or PlainObject | one or more or null | | element | HTMLElement | |

bindEvent

Parameters

| Name | Type | Description | |||-| | events | String | One or more space-separated event types and optional namespaces | | [ selector ] | String | | | callback | Function | | | element | HTMLElement | |

Returns

| Name | Type | Description | |||-| | element | HTMLElement | |

removeEvent

Parameters

| Name | Type | Description | |||-| | events | String | One or more space-separated event types and optional namespaces | | [ selector ] | String | | | callback | Function | | | element | HTMLElement | |

Returns

| Name | Type | Description | |||-| | element | HTMLElement | |

bindEventOnce

Parameters

| Name | Type | Description | |||-| | events | String | One or more space-separated event types and optional namespaces | | [ selector ] | String | | | callback | Function | | | element | HTMLElement | |

Returns

| Name | Type | Description | |||-| | element | HTMLElement | |

getEventEmitter

Parameters

| Name | Type | Description | |||-| | element | HTMLElement | |

Returns

| Name | Type | Description | |||-| | eventEmitter | EventEmitter | |

Browser support

Tested on all major browsers.

IE / EdgeIE / Edge FirefoxFirefox ChromeChrome SafariSafari OperaOpera
IE11, Edge last 2 versions last 2 versions last 2 versions last 2 versions

License

@pluginjs/events is Licensed under the GPL-v3 license.

If you want to use @pluginjs/events project to develop commercial sites, themes, projects, and applications, the Commercial license is the appropriate license. With this option, your source code is kept proprietary.

For purchase an Commercial License, contact us purchase@thecreation.co.

Copyright

Copyright (C) 2022 Creation Studio Limited.

Readme

Keywords

none

Package Sidebar

Install

npm i @pluginjs/events

Homepage

pluginjs.com

Weekly Downloads

53

Version

0.8.11

License

GPL-3.0

Unpacked Size

48.3 kB

Total Files

10

Last publish

Collaborators

  • thecreation
  • kaptinlin