How to use the lit-html.html function in lit-html

To help you get started, we’ve selected a few lit-html examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github corpusculejs / corpuscule / packages / element / src / dhtml.js View on Github external
if (i < strings.length - 1 && isUnsafeStatic(values[i])) {
          record[record.length - 1] += String(values[i].value);
          previousValueWasStatic = true;
        } else {
          previousValueWasStatic = false;
        }
      }
    } else {
      record = strings;
    }

    registry.set(strings, record);
  }

  return html(
    record,
    ...record !== strings
      ? values.filter(value => !isUnsafeStatic(value))
      : values,
  );
};
github cfware / babel-plugin-template-html-minifier / fixtures / transform-template-literals-after.js View on Github external
};
	return data;
}

function _taggedTemplateLiteral(strings, raw) {
	if (!raw) {
		raw = strings.slice(0);
	}
	return Object.freeze(Object.defineProperties(strings, {raw: {value: Object.freeze(raw)}}));
}

import {html, render} from 'lit-html';

const myclass = 'test';
const disabled = false;
html(_templateObject(),myclass,disabled);render(_templateObject2(),myclass,disabled);
github cfware / babel-plugin-template-html-minifier / fixtures / tagged-template-non-factory-source.js View on Github external
import {html} from 'lit-html';

html(document.body)`
	<div>Testing</div>
`;
html`
	<div>Testing</div>
`;
github cfware / babel-plugin-template-html-minifier / fixtures / tagged-template-non-factory.js View on Github external
import {html} from 'lit-html';

html(document.body)`
	<div>Testing</div>
`;
html`<div>Testing</div>`;