pointer-events

0.0.4 • Public • Published

PointerEvents

 
  • Install via npm: npm install pointer-events
  • Install via Bower: bower install pointer-events

Small little script for simulating pointer-events: none in older browsers – namely, Internet Explorer.

Please see the example/index.html example.

Implementing

You can use PointerEvents in very much the same way you use the CSS property. Simply specify data-pointer-events="none" on the element you want to have no pointer events.

<div class="foreground" data-pointer-events="none">
    Foreground element.
</div>

Functionality

  • Common events are relayed to the underlying node;
  • Properties except class and style are copied across;
  • Style cursor is copied across;
  • Adds and removes hover class for use instead of pseudo-class :hover;

PointerEvents uses document.elementFromPoint to determine what's immediately below the data-pointer-events node.

Bugs

Please feel free to submit new issues.

However if you want to make your own changes and to submit them via a pull request, then that would be more than appreciated!

Package Sidebar

Install

npm i pointer-events

Weekly Downloads

0

Version

0.0.4

License

BSD-2-Clause

Last publish

Collaborators

  • wildhoney