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

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

/**
 * Returns the normalized event target in cases when it has shadow root.
 * @param {Object} target The original event target
 * @returns {Object} The normalized target
 */
const getNormalizedTarget = (target) => {
    let element = target;
    if (target.shadowRoot && target.shadowRoot.activeElement) {
        element = target.shadowRoot.activeElement;
    }
    return element;
};
export default getNormalizedTarget;
//# sourceMappingURL=getNormalizedTarget.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy