Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
{"version":3,"file":"getNormalizedTarget.js","sourceRoot":"","sources":["../../src/util/getNormalizedTarget.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,mBAAmB,GAAG,CAAC,MAAmB,EAAE,EAAE;IACnD,IAAI,OAAO,GAAG,MAAM,CAAC;IAErB,IAAI,MAAM,CAAC,UAAU,IAAI,MAAM,CAAC,UAAU,CAAC,aAAa,EAAE;QACzD,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,aAA4B,CAAC;KACzD;IAED,OAAO,OAAO,CAAC;AAChB,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC","sourcesContent":["/**\n * Returns the normalized event target in cases when it has shadow root.\n * @param {Object} target The original event target\n * @returns {Object} The normalized target\n */\nconst getNormalizedTarget = (target: HTMLElement) => {\n\tlet element = target;\n\n\tif (target.shadowRoot && target.shadowRoot.activeElement) {\n\t\telement = target.shadowRoot.activeElement as HTMLElement;\n\t}\n\n\treturn element;\n};\n\nexport default getNormalizedTarget;\n"]}