Error codes · Markup
PW5022
unknown_event
The program must hold to this: an element handles an event the platform declares.
A program the compiler refuses with it
module shop.click
page Clicker() {
route "/clicker"
cache private
signal count: Int = 0
view {
<title>Clicker</title>
<button type="button" on:click={() => count = count + 1}>Press</button>
}
}From State in the browser: signals and handlers, in Pages. A test holds the guide's examples to the compiler.
The decisions behind it
Reading the diagnostic
pw check prints the code in brackets, [PW5022], with the sentence above and the place in your program. Errors and diagnostics explains how to read one, and every code is listed with its rule.