
1. The sly will unwrap itself automatically when the expression in data-sly-test evaluates to true.
For Example: <sly data-sly-test="true">foo</sly>
will render foo
2. The div will not unwrap automatically.
For Example: <div data-sly-test="true">foo</sly>
will render <div>foo</div>
3. If you use data-sly-unwrap the div tag will unwrap. sly is just a shorthand.
For Example: <div data-sly-test="true" data-sly-unwrap>foo</sly>
will render foo
Happy Coding !!
AEM Developer
Nice article and easy to understand.
Very helpful and straight to the point, thank you! =)