aria-hidden
Advanced tools
Comparing version 1.1.0 to 1.1.1
export declare type Undo = () => void; | ||
export declare const hideOthers: (target: HTMLElement | HTMLElement[], parentNode?: HTMLElement, markerName?: string) => Undo; | ||
export declare const hideOthers: (originalTarget: HTMLElement | HTMLElement[], parentNode?: HTMLElement, markerName?: string) => Undo; |
@@ -6,6 +6,6 @@ var defaultParent = typeof document !== 'undefined' ? document.body : null; | ||
var lockCount = 0; | ||
export var hideOthers = function (target, parentNode, markerName) { | ||
export var hideOthers = function (originalTarget, parentNode, markerName) { | ||
if (parentNode === void 0) { parentNode = defaultParent; } | ||
if (markerName === void 0) { markerName = "data-aria-hidden"; } | ||
var targets = Array.isArray(target) ? target : [target]; | ||
var targets = Array.isArray(originalTarget) ? originalTarget : [originalTarget]; | ||
if (!markerMap[markerName]) { | ||
@@ -17,3 +17,3 @@ markerMap[markerName] = new WeakMap(); | ||
var deep = function (parent) { | ||
if (!parent || parent === target) { | ||
if (!parent || targets.indexOf(parent) >= 0) { | ||
return; | ||
@@ -20,0 +20,0 @@ } |
export declare type Undo = () => void; | ||
export declare const hideOthers: (target: HTMLElement | HTMLElement[], parentNode?: HTMLElement, markerName?: string) => Undo; | ||
export declare const hideOthers: (originalTarget: HTMLElement | HTMLElement[], parentNode?: HTMLElement, markerName?: string) => Undo; |
@@ -8,6 +8,6 @@ "use strict"; | ||
var lockCount = 0; | ||
exports.hideOthers = function (target, parentNode, markerName) { | ||
exports.hideOthers = function (originalTarget, parentNode, markerName) { | ||
if (parentNode === void 0) { parentNode = defaultParent; } | ||
if (markerName === void 0) { markerName = "data-aria-hidden"; } | ||
var targets = Array.isArray(target) ? target : [target]; | ||
var targets = Array.isArray(originalTarget) ? originalTarget : [originalTarget]; | ||
if (!markerMap[markerName]) { | ||
@@ -19,3 +19,3 @@ markerMap[markerName] = new WeakMap(); | ||
var deep = function (parent) { | ||
if (!parent || parent === target) { | ||
if (!parent || targets.indexOf(parent) >= 0) { | ||
return; | ||
@@ -22,0 +22,0 @@ } |
{ | ||
"name": "aria-hidden", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Cast aria-hidden to everything, except...", | ||
@@ -12,2 +12,3 @@ "main": "dist/es5/index.js", | ||
"build": "ts-react-toolbox build", | ||
"prepublish": "yarn build", | ||
"release": "ts-react-toolbox release", | ||
@@ -14,0 +15,0 @@ "lint": "ts-react-toolbox lint", |
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
8305