3 ms·
It's weird that the default behavior when appending a template is to not clone it requiring an additional clone call >>template.content.cloneNode(true)
by option_greek 8y ago
It's weird that the default behavior when appending a template is to not clone it requiring an additional clone call
>>template.content.cloneNode(true)
- lucideer 8y agoThat's the default behaviour when appending a DocumentFragment or a Node, and has been since 1997. The template is just a container for the DocumentFragment, the template content still behaves like any other DocumentFragment always would have, so changing behaviour would be pretty crazy.