<!-- the scroll event's default behavior (scrolling) will happen --> <!-- immediately, instead of waiting for `onScroll` to complete --> <!-- in case it contains `event.preventDefault()` --> <divv-on:scroll.passive="onScroll">...</div>
The
.passive
modifier is especially useful for improving performance on mobile devices.
Don’t use
.passive
and
.prevent
together, because
.prevent
will be ignored and your browser will probably show you a warning. Remember,
.passive
communicates to the browser that you
don’t
want to prevent the event’s default behavior.