Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bianco.events

Package Overview
Dependencies
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bianco.events

Modern DOM events helpers written in es2015

  • 0.0.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
119
decreased by-5.56%
Maintainers
3
Weekly downloads
 
Created
Source

bianco.events

Build Status NPM version NPM downloads MIT License

Modern DOM events helpers written in es2015

This script will not be transpiled and it is only thought to be part of your build chain.

Usage

import { add, remove, once } from 'bianco.events'

add(node/s, 'click mouseenter', function(e) {
  console.log('tadaaa!')
})

API

add

Set a listener for all the events received separated by spaces

Parameters

  • els (HTMLElement | Array) DOM node/s where the listeners will be bound
  • evList String list of events we want to bind space separated
  • cb Function listeners callback
  • options Object event options (capture, once and passive)

Returns (HTMLElement | NodeList | Array) DOM node/s and first argument of the function

once

Set a listener using from a list of events triggering the callback only once

Parameters

  • els (HTMLElement | Array) DOM node where the listeners will be bound
  • evList String list of events we want to bind space separated
  • cb Function listeners callback
  • options Object event options (capture, once and passive)

Returns (HTMLElement | NodeList | Array) DOM node/s and first argument of the function

remove

Remove all the listeners for the events received separated by spaces

Parameters

  • els (HTMLElement | Array) DOM node/s where the events will be unbind
  • evList String list of events we want unbind space separated
  • cb Function listeners callback
  • options Object event options (capture, once and passive)

Returns (HTMLElement | NodeList | Array) DOM node/s and first argument of the function

Keywords

FAQs

Package last updated on 03 May 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc