npm.io
0.0.12 • Published 3 years ago

@oasis-engine/pointer-polyfill

Licence
MIT
Version
0.0.12
Deps
0
Size
19 kB
Vulns
0
Weekly
0

Pointer Event Polyfill

English | 简体中文


image

This polyfill can solve the problem of onPointerXXX callback exceptions in the Oasis script life cycle due to some browsers not supporting PointerEvent.

Usage

Install the npm package (please use the latest version of the package)

npm install @oasis-engine/pointer-polyfill
import
import "@oasis-engine/pointer-polyfill";

QA

Q:Need to judge whether PointerEvent is supported before importing?

A:Unnecessary.

Q.Why not write directly into the engine?

A:Pointer is the future, so this adaptation may not be needed in the near future.