Socket
Socket
Sign inDemoInstall

longpressjs

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    longpressjs

lightweight longpress library


Version published
Weekly downloads
5
increased by66.67%
Maintainers
1
Install size
7.72 kB
Created
Weekly downloads
 

Readme

Source

Lonpress JS

Less than 1kb minified version

Installation

 npm i longpressjs

Usage

import "longpressjs";

const h1 = document.querySelector("h1");
h1.addEventListener("longpress", function (e) {
  console.log(e);
});

If you dont pass a delay the default is 500ms

const h1 = document.querySelector("h1");
h1.addEventListener("longpress-1000", function (e) {
  console.log(e);
});

This code is 1000ms delay

Keywords

FAQs

Last updated on 11 Sep 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc