@terminus/ngx-tools
Version:
[![CircleCI][circle-badge]][circle-link] [![codecov][codecov-badge]][codecov-project] [![semantic-release][semantic-release-badge]][semantic-release] [![MIT License][license-image]][license-url] <br> [![NPM version][npm-version-image]][npm-url] [![Github
12 lines (11 loc) • 335 B
TypeScript
/**
* Helper function to retrieve desired DOM attribute's value
*
* @param el - HTMLElement
* @param attr - Desired attribute
* @returns attribute's value
*
* @example
* getDomAttribute(myElement, 'id'); // Returns: the element ID
*/
export declare function getDomAttribute(el: HTMLElement, attr: string): string | undefined;