GX2007: dynamic event attribute
An HTML event attribute such as onclick has an expression as its value.
Cause
An HTML event attribute such as onclick has an expression as its value. A value from the server in a script is a risk.
Example
package card
props {
Script string
}
<button onclick={p.Script}>Run</button>gx check reports:
ui/card/Card.gx:7:9: GX2007: attribute "onclick" cannot take an expressionFix
Use an on: directive with a signal statement or an action, for example on:click={route.Add{}}.