Most of these are stolen from the good project https://github.com/hammerjs/hammer.js . But some modifications, and some logic is removed.
There is some environment where general dom
is not available. Thus we have to
write a decorator for libraries. Otherwise we could write a polyfill for that
environment. But both these approachs are difficult on a platform like wechat.
Then the library was refactored.
- Remove CSS supports and browser features
- no references to
window
ordocument
- A
Virtual
Object as a DOM proxy is exposed - Only one
Input
Object left (no browser feature supports)