All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.util.getNormalizedTarget.js.map Maven / Gradle / Ivy

{"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"]}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy