Socket
Socket
Sign inDemoInstall

mouse-change

Package Overview
Dependencies
1
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mouse-change

Mouse state change listener


Version published
Maintainers
1
Install size
11.1 kB
Created

Readme

Source

mouse-change

Listens for any mouse state changes.

Example

require('mouse-change')(function(buttons, x, y) {
  document.body.innerHTML = 
    '<p>Buttons: 0b' + buttons.toString(2) + 
    ', x:' + x + 
    ', y:' + y + '</p>'
})

Try it out in your browser

Install

npm i mouse-change

API

require('mouse-change')([element,] onchange(buttons,x,y))

Listens for any mouse state changes on the given element.

  • element is an optional element
  • onchange(buttons,x,y) is called every time that the mouse state changes inside element

License

(c) 2015 Mikola Lysenko. MIT License

Keywords

FAQs

Last updated on 16 Feb 2015

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc