Skip to main content

Home > @jsplumbtoolkit/dialogs-core > extract

extract() function

Extracts a dataset from the given element by finding child elements that have a jtk-att attribute set, and extracting from those elements their value. When the same jtk-att value appears more than once as a child of el, the values are stored in an array for that field.


export declare function extract(el: HTMLElement, unresolvedElementGetter?: (el: Element) => any): Record<string, any>;


elHTMLElementElement to extract values from.
unresolvedElementGetter(el: Element) => anyOptional function to use when an element with an unknown tag has a jtk-att declared on it. This function is given the element and whatever it returns - even null - will be set on the outgoing data.


Record<string, any>