Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

makeup-focusables

Package Overview
Dependencies
Maintainers
5
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

makeup-focusables - npm Package Compare versions

Comparing version 0.0.5 to 0.1.0

18

index.js

@@ -8,2 +8,18 @@ 'use strict';

var keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var callback = arguments.length > 2 ? arguments[2] : undefined;
if (callback) {
var request = requestAnimationFrame(function () {
callback(getFocusables(el, keyboardOnly));
});
return function () {
cancelAnimationFrame(request);
};
}
return getFocusables(el, keyboardOnly);
};
function getFocusables(el) {
var keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var focusableEls = Array.prototype.slice.call(el.querySelectorAll(focusableElSelector)); // filter out elements with display: none

@@ -22,2 +38,2 @@

return focusableEls;
};
}

2

package.json
{
"name": "makeup-focusables",
"description": "Returns an array of all focusable descendants of the given element",
"version": "0.0.5",
"version": "0.1.0",
"main": "index.js",

@@ -6,0 +6,0 @@ "repository": "https://github.com/makeup/makeup-js/tree/master/packages/makeup-focusables",

@@ -54,4 +54,5 @@ # makeup-focusables

* `keyboardOnly`: return only elements focusable in sequential keyboard navigation (default: false)
* `callback`: if set, will call focusables after `requestAnimationFrame` and will pass the list of focusables in a callback method
## Custom Events
## Custom Events

@@ -58,0 +59,0 @@ * None

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc