3 ms·
Can't this be done more easily / programmatically via createDocumentFragment? https://developer.mozilla.org/en-US/docs/Web/API/Document/createDocumentFragment
by geuis 4y ago
Can't this be done more easily / programmatically via createDocumentFragment?
https://developer.mozilla.org/en-US/docs/Web/API/Document/createDocumentFragment https://developer.mozilla.org/en-US/docs/Web/API/Document/cr...
- colejohnson66 4y agoThat's what the `<template>` element does. From the HTML standard[0]: > The template element can have template contents, but such template contents are not children of the template element itself. Instead, they are stored in a DocumentFragment associated with a different Document — without a browsing context — so as to avoid the template contents interfering with the main Document. [0]: https://html.spec.whatwg.org/multipage/syntax.html#template-syntax https://html.spec.whatwg.org/multipage/syntax.html#template-...