Returns an object mapping each query string to the corresponding HTMLElement (or null) found by id. The object keys are in PascalCase and prefixed with "el".
id
A tuple of string query names in kebab-case.
The list of id attribute names (in kebab-case) to query.
An object with keys in the form el<PascalCaseQuery> and values as the corresponding HTMLElement or null.
el<PascalCaseQuery>
const els = mapElementsById('foo-bar', 'baz');// els.elFooBar -> HTMLElement | null (for id="foo-bar")// els.elBaz -> HTMLElement | null (for id="baz") Copy
const els = mapElementsById('foo-bar', 'baz');// els.elFooBar -> HTMLElement | null (for id="foo-bar")// els.elBaz -> HTMLElement | null (for id="baz")
Returns an object mapping each query string to the corresponding HTMLElement (or null) found by
id
. The object keys are in PascalCase and prefixed with "el".