PiotrMachowski / Home-Assistant-Lovelace-HTML-Jinja2-Template-card

This card displays provided Jinja2 template as an HTML content of a card. It uses exactly the same engine as Home Assistant in Developer tools.
MIT License
68 stars 10 forks source link

<script> in custom:html-template-card #10

Open tunerooster opened 3 years ago

tunerooster commented 3 years ago

Is this the best place to ask questions re: this card? Please advise otherwise...

I have the following:

type: 'custom:html-template-card'
content: >
  <script>function hello() {alert('hi there');}</script>
  <button onclick="hello();"> O </button>

When I click the button nothing happens... Can I use javascript functions defined in

Is the Githubissues.

  • Githubissues is a development platform for aggregating issues.