fix(core): update
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import * as plugins from './smartntml.plugins.js';
|
||||
|
||||
import type * as litTypes from 'lit';
|
||||
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
||||
export type { TemplateResult } from 'lit';
|
||||
|
||||
export class Smartntml {
|
||||
@@ -24,7 +25,8 @@ export class Smartntml {
|
||||
|
||||
// INSTANCE
|
||||
private render: typeof litTypes.render;
|
||||
html: typeof litTypes.html;
|
||||
public html: typeof litTypes.html;
|
||||
public unsafeHTML: typeof unsafeHTML;
|
||||
|
||||
constructor() {
|
||||
this.init();
|
||||
@@ -32,8 +34,10 @@ export class Smartntml {
|
||||
|
||||
public async init() {
|
||||
const lit = await import('lit');
|
||||
const litUnsafeHtmlDirective = await import('lit/directives/unsafe-html.js');
|
||||
this.render = lit.render;
|
||||
this.html = lit.html;
|
||||
this.unsafeHTML = litUnsafeHtmlDirective.unsafeHTML;
|
||||
}
|
||||
|
||||
public async renderTemplateResult(templateResult: litTypes.TemplateResult, stripCommentsArg = true) {
|
||||
|
||||
Reference in New Issue
Block a user