UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

6 lines (5 loc) 611 B
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.33/esri/copyright.txt for details. */ import{isActivationKey as n}from"../widgetUtils.js";function t(){return function(n,t){if(!n[t])throw new TypeError(`Cannot auto bind undefined function '${String(t)}'`);return{value:r(n[t])}}}function e(n){const t=n?.type;return n instanceof KeyboardEvent||"keyup"===t||"keydown"===t||"keypress"===t}function r(t){return function(r,...o){e(r)?n(r.key)&&(r.preventDefault(),r.stopPropagation(),r.target.click()):t.call(this,r,...o)}}export{t as accessibleHandler};