Closed Seanmclem closed 4 years ago
@Seankps the html
method isn't random and isn't a dependency of this extension either. it's what Polymer, lit-html and lit-element use to define web components markup. Hence you import html from them. I added the ability to use /*html*/
and /*css*/
for folks who dont use the aforementioned frameworks so feel free to use that.
Prettier
doesn't format inline template if I use template: /*html*/
but it works with template: html
where 'html' is not defined.eslint(no-undef)
.
So I think /*html*/
have to work the same as html
syntax.
@mmospanenko I am pretty sure this is related to Prettier itself not recognizing the /*html*/
syntax, as i don't have any control over how Prettier or any other formatter behaves.
when doing html`markup` when running my code I get errors because of the apparent random reference to "html"
I had to use
/*html*/`markup`
and that worked, but it'd be nice if I could get the other method to work. I'm using the string in an assignment directly to a template element's innerHTML, similar to the template-literal seen here on a repo of mine.