Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 667 Bytes

select-all.md

File metadata and controls

18 lines (14 loc) · 667 Bytes

Lithen - SuperElement - selectAll method

The selectAll method works just like the select method, but the is on element.root.querySelectorAll instead.

Parameters

  • query - type string - an element selector. Example: '.any-class', '#any-id'.

Usage

this.selectAll('.any-class')
// or
element.selectAll('.any-class')

That method can receive a generic when used with typescript, this generic must extends HTMLElement and if not passed it uses the HTMLElement type and the type used is always set as an Array of this generic:

this.selectAll<HTMLInputElement>('.my-input') // return the element with correct typing