Skip to content

dom input eventListener default behaviour πŸ€” Β #69

@LawEKS

Description

@LawEKS

The input eventListener has its third parameter set to false. But this optional parameter can be an object with a specific key to achieve your desired result.

If you want to preventDefault behaviour for submit button you can do

input.addEventListener("keyup", search, {passive: false})

But considering that you are listening for a "keyup" event.
What is the default behaviour of this?
Do you need to set this optional parameter?

Have a look at MDN for reference
EventTarget.addEventListener()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions