create-html-template-element
Create an HTML
<template>
with content.
Installation
Node.js >= 10
is required. To install, type this at the command line:
npm install create-html-template-element
Importing
ES Module:
;
CommonJS Module:
const html = ;
Usage
As a tagged template literal:
const TEMPLATE = html` txt`;//-> HTMLTemplateElement
As a regular function:
const TEMPLATE = ;//-> HTMLTemplateElement
With custom document
(useful for jsdom):
const TEMPLATE = ;//-> HTMLTemplateElement