@bluem/form-control-event-name

1.0.7 • Public • Published

Overview

This library is a helper library extracted from @bluem/form-change-tracker to be reused in other contexts. It merely serves for getting the name of the event emitted by an HTML form element when changed (for example: “click” for a checkbox, “change” for a <select> element).

Browser support

This library will work (at least) on:

  • Google Chrome Desktop and Android (any version)
  • Firefox Desktop and Android (any version)
  • Safari Desktop and iOS (any version)
  • Microsoft Edge (any version)
  • Microsoft IE11 (older versions untested)

Usage

The library is an ES6 class, so the way to use it depends on your tooling and the browsers you want to support. But basic usage is:

// If using native ES6 module in browser:
import formControlEvenName from './node_modules/@bluem/form-control-event-name/index.js';

// OR:
// If using Webpack or Parcel for bundling:
// import formControlEventName from '@bluem/form-control-event-name/index.js';

formControlEventName(myFormElement); // Will return the name of the event (string)

Tests

Install npm depencencies, then run npm run test or npm run test-coverage.

License

MIT License

Version History

1.0.7 (2022-12-08)

  • Updated npm dependencies to fix vulnerabilites in dev dependencies. No relevant change in the module itself.

1.0.6 (2022-04-10)

  • Updated npm dependencies to fix vulnerabilites in dev dependencies. No changes in the module itself.

1.0.5 (2021-06-27)

  • Updated npm dependencies to fix vulnerabilites in dev dependencies. No changes in the module itself.

1.0.4 (2020-09-29)

  • Fix IE11 compatibility, for cases where ES6 is not transpiled to ES5.
  • Updated npm dependencies to fix some vulnerabilites in 3rd-party code

1.0.3 (2020-01-26)

  • Updated npm dependencies to fix vulnerabilites in 3rd-party code. No changes in the module itself.

1.0.1 (2019-08-14)

  • Updated npm dependencies to fix vulnerabilites in 3rd-party code. No changes in the module itself.

1.0 (2018-12-02)

  • Initial release

Readme

Keywords

Package Sidebar

Install

npm i @bluem/form-control-event-name

Weekly Downloads

11

Version

1.0.7

License

MIT

Unpacked Size

6.06 kB

Total Files

5

Last publish

Collaborators

  • bluem