File "removeAttribute.ts"

Full path: /home/fsibplc/public_html/sommilito-bank2/splide-4.1.3/src/js/utils/dom/removeAttribute/removeAttribute.ts
File size: 401 B (401 B bytes)
MIME-type: text/x-java
Charset: utf-8

Download   Open   Edit   Advanced Editor   Back

import { forEach } from '../../array';


/**
 * Removes attributes from the element.
 *
 * @param elms  - An element or elements.
 * @param attrs - An attribute or attributes to remove.
 */
export function removeAttribute( elms: Element | Element[], attrs: string | string[] ): void {
  forEach( elms, elm => {
    forEach( attrs, attr => {
      elm && elm.removeAttribute( attr );
    } );
  } );
}