Open zdenko opened 6 years ago
It may be possible to wrap the items in a documentFragment
. This should be fine for the external uses as document.body.appendChild
will work fine with that, but we may need to add a check for when a template adds a subtemplate to get the reference counts right in the Jadelet runtime.
It is better form to have each template have a designated root element, semantically it just makes more sense to me. Personally I've never needed sibling elements returned in practice.
Would it be wrong if the missing root element is automatically added:
So
becomes
I did a test with a small change in the
compiler.coffee
, and it works.The only caveat here is that the HTML output might not be what the user expects.