This bug affects group-header templates.
A span inside a tbody is invalid HTML. A tbody tag cannot support span tags as direct children, only tr tags. Therefor , the following will fail:
HTML
<template id="test">
<table>
<tbody>
<!-- CONTAINER FOR ITEMS -->
<span hidden mt-template="team-member" mt-records="[[RECORDS]]"></span>
</tbody>
</table>'
</template>
JS
const tb = document.querySelector("#test");
console.log (tb.innherHTML); // fails
The innerHTML property of the template will actually move the span outside of the table, and place it above the table.
Result of tb.innerHTML
<span hidden mt-template="team-member" mt-records="[[RECORDS]]"></span>
<table>
<tbody>
<!-- CONTAINER FOR ITEMS -->
</tbody>
</table>'
This bug affects group-header templates.
A
spaninside atbodyis invalid HTML. Atbodytag cannot supportspantags as direct children, onlytrtags. Therefor , the following will fail:HTML
JS
The
innerHTMLproperty of thetemplatewill actually move thespanoutside of the table, and place it above the table.Result of tb.innerHTML