Key-names in LUA?

Hi folks,

I do some test with dom and want to insert a data-tooltip. Doing that in simple HTML is no problem. But it looks like, using a “-” in a key name is not allowed in Lua?

This is the code I want to insert:

  dom.span{
    data-tooltip="test",
    dom.a{href="blabla", "blabla")}
  }

I tried several options to mask it without luck…

As far as I understand, the “data-tooltip” name is fixed for CSS, so I can’t change that.

Is there a way to workaround that, other than adding that in plain html?

Thanks!

Nevermind, found it at last:

This does it:
["data-tooltip"]="test"

1 Like