@notainc/mouse-hover-visible
Advanced tools
Comparing version 0.0.4 to 0.0.5
16
index.js
@@ -1,5 +0,5 @@ | ||
(function () { | ||
let currentHoverVisible = false | ||
var(function () { | ||
var currentHoverVisible = false | ||
const modifierKeys = [ | ||
var modifierKeys = [ | ||
16, // shift | ||
@@ -14,5 +14,5 @@ 17, // control | ||
function supportsPassiveEvent () { | ||
let exist = false | ||
var exist = false | ||
try { | ||
const opts = Object.defineProperty({}, 'passive', { | ||
var opts = Object.defineProperty({}, 'passive', { | ||
get: function () { exist = true } | ||
@@ -28,4 +28,4 @@ }) | ||
// some components like Boostrap Dropdown menu call stopPropagate() | ||
const useCapture = true | ||
const options = supportsPassiveEvent() | ||
var useCapture = true | ||
var options = supportsPassiveEvent() | ||
? { passive: true, capture: useCapture } | ||
@@ -71,3 +71,3 @@ : useCapture | ||
currentHoverVisible = hoverVisible | ||
const body = document.body | ||
var body = document.body | ||
if (hoverVisible) { | ||
@@ -74,0 +74,0 @@ body.dataset.hoverVisible = '' |
{ | ||
"name": "@notainc/mouse-hover-visible", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "This library allows you to show CSS :hover pseudo-class only when triggered by the mouse.", | ||
@@ -5,0 +5,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5308