Complete the code to prevent the default form submission behavior.
<form @submit[1]="submitForm"> <button type="submit">Send</button> </form>
The .prevent modifier stops the default action, like submitting a form.
Complete the code to stop the click event from bubbling up.
<button @click[1]="handleClick">Click me</button>
The .stop modifier stops the event from bubbling up to parent elements.
Fix the error in the code to make the click event fire only once.
<button @click[1]="submit">Submit</button>
The .once modifier makes the event listener run only once and then remove itself.
Fill both blanks to prevent default and stop propagation on a link click.
<a href="#" @click[1][2]="handleClick">Link</a>
Using .prevent stops the default link navigation, and .stop stops the event from bubbling up.
Fill all three blanks to create a button that fires once, prevents default, and stops propagation.
<button @click[1][2][3]="doAction">Action</button>
The modifiers .once, .prevent, and .stop together make the event fire once, prevent default behavior, and stop bubbling.