template-content.d.ts 1006 B

1234567891011121314151617181920212223242526
  1. /**
  2. * @license
  3. * Copyright 2020 Google LLC
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. import { noChange } from '../lit-html.js';
  7. import { Directive, PartInfo } from '../directive.js';
  8. declare class TemplateContentDirective extends Directive {
  9. private _previousTemplate?;
  10. constructor(partInfo: PartInfo);
  11. render(template: HTMLTemplateElement): DocumentFragment | typeof noChange;
  12. }
  13. /**
  14. * Renders the content of a template element as HTML.
  15. *
  16. * Note, the template should be developer controlled and not user controlled.
  17. * Rendering a user-controlled template with this directive
  18. * could lead to cross-site-scripting vulnerabilities.
  19. */
  20. export declare const templateContent: (template: HTMLTemplateElement) => import("../directive.js").DirectiveResult<typeof TemplateContentDirective>;
  21. /**
  22. * The type of the class that powers this directive. Necessary for naming the
  23. * directive's return type.
  24. */
  25. export type { TemplateContentDirective };
  26. //# sourceMappingURL=template-content.d.ts.map