🔰handler options
JS ⟩ browser ⟩ event ⟩ handler ⟩ register ⟩ options
elem.addEventListener(event, handler, {
once: true, // automatically removed after it triggers.
capture: true, // capturing phase
passive: true, // handler won't call preventDefault()
});capture: -> Bubbling and capturing.optionscan also befalse/true, that’s the same as{capture: false/true}.passive: -> Browser default actions.
Last updated
Was this helpful?