hyTags
HomeHome DocumentationDocumentation

selection-sort-children

Sorts the children of the selected element based on a comparison.
Parameter
Type
Description
asc
Bool?
True for ascending order, false for descending (optional)
commands
Commands
Commands to compute sort value for each child
return
void
Void
Test Case:Sort children ascending
    <div><span>b</span><span>a</span></div>
    
    <selection-sort-children asc="true">
      <selection-get-text>
    </selection-sort-children>
    <selection-change first-child="*">
    <selection-get-text>
    <assert-equal value="a" type="string">
    
    👆 Try to change something!
  • Test succeeded Test failed