I am unable to understand this piece of JavaScript:
Template.welcome.events({
'submit form' (event, template) {
event.preventDefault()
}
})
Is submit form
the name of a method, with a space in it? If that's the case is the opening curly brace on line 1 denoting the start of a block scope?
Is this just a typo in the code and there's supposed to be a :
after 'submit form'
?
I tried to put it through a linter and JSLint failed, but ESLint gave me unrelated errors about Template being undefined.
I found it on this example repository: https://github.com/themeteorchef/holiday-wish-list/blob/master/code/client/templates/public/welcome.js#L8..L12