@titian-design/touchemulator

1.0.0 • Public • Published

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);

Package Sidebar

Install

npm i @titian-design/touchemulator

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

13.8 kB

Total Files

4

Last publish

Collaborators

  • zniu
  • suntgr
  • robbeluo
  • weimob-group