3 ms·
Is it just me, or can't you just leave the ", false" part away? And to the people that use "return false;" in their JS to prevent default actions from happenin
by dutchbrit 14y ago
Is it just me, or can't you just leave the ", false" part away?
And to the people that use "return false;" in their JS to prevent default actions from happening, i.e. a click on a link or submitting a form, don't, stop using it, e.preventDefault(); is the way to go, as posted by timothya.
- hobonumber1 14y agoYes, you can. The boolean just denotes whether the event is listened for during the event capture phase or the event bubbling phase. Makes no difference in this case.
- pharrington 14y agoAs of FF6, Firefox defaults to listening during the bubbling phase; before that though, the parameter was required in FF.