7

GitHub - jj811208/watching-you: watching-you is a javascript library for buildin...

 2 years ago
source link: https://github.com/jj811208/watching-you
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

watching-you

watching your mouse

watching your input value

Features

  • Ability to watch mouse or another DOM or even input values, watch anything you want!
  • Because it is DOM-based, it is easy to support RWD
  • Supports multiple frameworks
  • Zero dependency (every framework is!)
  • Written in typescript
  • The size of the core code is only 3kb after gzip compression
  • If the element is not on the screen, it will automatically stop watching

Example

Storybook

watching-you's storybook using react, but every framework can do the same thing!

https://jj811208.github.io/watching-you/storybook

Documents

Known limitations

  • When watching input, the text-align attribute must be left
  • Only px are supported

Compatibility

Chrome Firefox Safari Edge Opera iOS Safari/Chrome Android Chrome
Supported 70+ 73+ 14.1+ 80+ 70+ 14.1+ heavy_check_mark

Changing build settings or adding polyfill should result in better compatibility, but for now, I think that's enough, and I don't want its bundle size to get any bigger.

Contributions

If anyone wants to contribute, please open a issue and let me know, I'd be happy to write CONTRIBUTING.md.

License

ISC

  • more test

Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK