consolidated-events

2019-10-10 admin

consolidated-events是什么

什么是consolidated-events,Manage multiple event handlers using few event listeners

consolidated-events使用教程帮助文档

consolidated-events <sup>Version Badge</sup>

Build Status dependency status dev dependency status License Downloads

npm badge

Manage multiple event handlers using few event listeners.

Example

import { addEventListener } from 'consolidated-events';

const removeEventListener = addEventListener(
  window,
  'scroll',
  () => { console.log('scrolling') },
  { passive: true }
);

...

removeEventListener();

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-77039.html

文章标题:consolidated-events

回到顶部