Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@titian-design/touchemulator

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@titian-design/touchemulator

Emulate touch input on your desktop.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Touch Emulator

用来在 PC 浏览器上兼容 touch 事件。

根据 touchemulator 实现。

增加: Web Components 内部 dom 元素的 touch 能力。

安装

NPM:

npm install @titian-design/touchemulator
import * as TouchEmulator from '@titian-design/touchemulator';

new window.TouchEmulator(document.body);

CDN 地址

<script src="//unpkg.com/@titian-design/touchemulator@1.0.0/touch-emulator.js"></script>
<script>
  TouchEmulator();
</script>

Bookmarklet

javascript: !(function (a) {
  var b = a.createElement('script');
  (b.onload = function () {
    TouchEmulator();
  }),
    (b.src = '//unpkg.com/@titian-design/touchemulator@1.0.0/touch-emulator.js'),
    a.body.appendChild(b);
})(document);

Keywords

touch

FAQs

Package last updated on 06 Jan 2023

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