Skip to main content

getElementValue()

getElementValue(child, transform, recursive): Record<string, any>

Extracts and returns the value of an HTML element's attributes.

Parameters

ParameterTypeDefault valueDescription
childHTMLElementundefinedThe HTML element to extract values from.
transformRecord<string, (value) => any>{}-
recursivebooleantrueWhether to recursively extract values from child elements. Default is true.

Returns

Record<string, any>

An object containing the extracted values.