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

focus-lock

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

focus-lock - npm Package Compare versions

Comparing version 1.3.2 to 1.3.3

4

dist/es2015/return-focus.d.ts

@@ -14,3 +14,3 @@ declare type SetRef = () => Element | null;

};
export declare const recordElementLocation: (element: Element) => Location;
export declare const recordElementLocation: (element: Element | null) => Location | null;
/**

@@ -23,3 +23,3 @@ * Captures the current focused element to restore focus as close as possible in the future

*/
export declare const captureFocusRestore: (targetElement: Element) => (() => Element | undefined);
export declare const captureFocusRestore: (targetElement: Element | null) => (() => Element | undefined);
export {};

@@ -9,2 +9,5 @@ import { getTabbableNodes } from './utils/DOMutils';

export var recordElementLocation = function (element) {
if (!element) {
return null;
}
var stack = [];

@@ -29,2 +32,5 @@ var currentElement = element;

var _a, _b, _c, _d, _e;
if (!location) {
return undefined;
}
var stack = location.stack, ownerDocument = location.ownerDocument;

@@ -31,0 +37,0 @@ var visibilityCache = new Map();

@@ -14,3 +14,3 @@ declare type SetRef = () => Element | null;

};
export declare const recordElementLocation: (element: Element) => Location;
export declare const recordElementLocation: (element: Element | null) => Location | null;
/**

@@ -23,3 +23,3 @@ * Captures the current focused element to restore focus as close as possible in the future

*/
export declare const captureFocusRestore: (targetElement: Element) => (() => Element | undefined);
export declare const captureFocusRestore: (targetElement: Element | null) => (() => Element | undefined);
export {};

@@ -9,2 +9,5 @@ import { getTabbableNodes } from './utils/DOMutils';

export const recordElementLocation = (element) => {
if (!element) {
return null;
}
const stack = [];

@@ -29,2 +32,5 @@ let currentElement = element;

var _a, _b, _c, _d, _e;
if (!location) {
return undefined;
}
const { stack, ownerDocument } = location;

@@ -31,0 +37,0 @@ const visibilityCache = new Map();

@@ -14,3 +14,3 @@ declare type SetRef = () => Element | null;

};
export declare const recordElementLocation: (element: Element) => Location;
export declare const recordElementLocation: (element: Element | null) => Location | null;
/**

@@ -23,3 +23,3 @@ * Captures the current focused element to restore focus as close as possible in the future

*/
export declare const captureFocusRestore: (targetElement: Element) => (() => Element | undefined);
export declare const captureFocusRestore: (targetElement: Element | null) => (() => Element | undefined);
export {};

@@ -12,2 +12,5 @@ "use strict";

var recordElementLocation = function (element) {
if (!element) {
return null;
}
var stack = [];

@@ -33,2 +36,5 @@ var currentElement = element;

var _a, _b, _c, _d, _e;
if (!location) {
return undefined;
}
var stack = location.stack, ownerDocument = location.ownerDocument;

@@ -35,0 +41,0 @@ var visibilityCache = new Map();

{
"name": "focus-lock",
"version": "1.3.2",
"version": "1.3.3",
"description": "DOM trap for a focus",

@@ -5,0 +5,0 @@ "main": "dist/es5/index.js",

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