Closed chardin1 closed 2 years ago
Thanks for the request! I agree that clone()
would be a good feature. (If anyone is interested, PRs are welcome!)
Says this only has 1 child:
outline-white outline-color: {{color.white}};
All HTML Input is returned in a wrapper node, which means your first node will be the first child.
let res = parse('<tr><td translate="no">outline-white</td><td translate="no">outline-color: {{color.white}};</td></tr>');
res.firstChild // this is your tr
res.firstChild.children // these are your tds
Hope that helps!
try v5.2.2
It would be very helpful to be able to clone a node. I've tried using outerHTML and then reparsing it but my particular string seems to be throwing the parser off.
Says this only has 1 child:
<tr><td translate="no">outline-white</td><td translate="no">outline-color: {{color.white}};</td></tr>