Javascript: adding 'false' after running a function

function, javascript

Solution

It's `useCapture` variable.

If true, useCapture indicates that the user wishes to initiate capture. After initiating capture, all events of the specified type will be dispatched to the registered listener before being dispatched to any EventTarget beneath it in the DOM tree. Events which are bubbling upward through the tree will not trigger a listener designated to use capture. See DOM Level 3 Events for a detailed explanation. If not specified, useCapture defaults to false.

See MDN.

Problem

I'm analyzing a plugin as I want to modify it. I see various events firing functions like this: ``` document.getElementById(this.config.form).addEventListener("submit", this._submit, false); ``` My question is - what does `false` on the end actually do? Is it the same as adding `return = false` on the end of a function? If so, what is the purpose of adding this?

Original source