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

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

{
  "version": 3,
  "sources": ["../../../src/util/getNormalizedTarget.ts"],
  "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"],
  "mappings": "aAKA,MAAMA,EAAuBC,GAAwB,CACpD,IAAIC,EAAUD,EAEd,OAAIA,EAAO,YAAcA,EAAO,WAAW,gBAC1CC,EAAUD,EAAO,WAAW,eAGtBC,CACR,EAEA,eAAeF",
  "names": ["getNormalizedTarget", "target", "element"]
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy