New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

class-change

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

class-change

A versatile Element.classList alternative for manipulating CSS class names, triggering change events using HTML data attributes, and creating class-related event listeners using a simple, declarative API.

Source
npmnpm
Version
1.1.4
Version published
Maintainers
1
Created
Source

class-change.js

NPM Build Status Codacy Codecov License: MIT Tweet

A versatile Element.classList alternative for manipulating CSS class names, triggering change events using HTML data attributes, and creating class-related event listeners using a simple, declarative API.

  • Homepage - Documentation and usage examples

Description

CSS class names change. A lot.

Yet the native methods for manipulating CSS class names remain rudimentary. Element.classList provides a basic API for working with classes, but some browsers suffer from an incomplete implementation (or lack support entirely), changes can only be applied to a single element, and separate event listeners must be created for each change event. The result is often polyfills or patches for legacy browsers, manual loops for applying changes to multiple elements, repeated boilerplate code for handling delegated events, and performance issues caused by a high volume of event listeners.

This micro-library aims to address these issues by reducing and simplifying the code required for CSS class changes and events.

Contact & Support

License

This project is licensed under the MIT License. See the LICENSE for details.

Copyright (c) 2016 John Hildenbiddle (@jhildenbiddle)

Keywords

attribute

FAQs

Package last updated on 08 Dec 2018

Did you know?

Socket

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.

Install

Related posts