google / closure-templates

A client- and server-side templating system that helps you dynamically build reusable HTML and UI elements

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question about soy reportWarnings

poucet opened this issue · comments

Hi,

We use soy templates in our server-side to render a simple <gr-app id="app"></gr-app> template that is then used by our client-side lit code to hook up the full web-app.

We've recently upgraded and we now get the following warning:

Jan 26, 2022 8:43:30 PM com.google.template.soy.SoyFileSet reportWarnings
WARNING: warnings during Soy compilation
com/google/gerrit/httpd/raw/PolyGerritIndexHtml.soy:160: warning: Html id attributes should not be valid JavaScript identifiers, consider hyphenating the id.
160:   <gr-app id="app"></gr-app>{\n}

Given how our code is structured, I don't think this warning is relevant for us.

  • What is the purpose behind this warning?
  • Is there a way to turn it off?

Thank you