hyTags
HomeHome DocumentationDocumentation

selection-replace-children

Replaces all children of the selected element with a fragment.
Parameter
Type
Description
fragment
Fragment
Fragment to replace children with
return
void
Void
Test Case:Replace children with fragment
    <div><span>old</span></div>
    
    <fragment-from-string value="<span>new</span>">
    <selection-replace-children>
    <selection-get-html>
    <assert-equal value="<span>new</span>" type="string">
    
    👆 Try to change something!
  • Test succeeded Test failed