Optional
undefinedIsEmpty: boolean// Shuffle the class attributes of all the children of the first main element:
import { set } from 'deleight/queryoperator';
import { uItems } from 'deleight/generational';
const main = document.querySelector('main');
const values = uItems(main.children.map(c => c.className));
set(main.children, {_class: values});
Set specified properties and/or attributes on the specified elements (or their children). Pass an iterable of elements (often an array) as the first arg and an object mapping property names to value iterables to be matched against the elenments at corresponding indices.
If a key in
values
starts with the underscore (_
), the attribute with the name following the underscore will be set.