[PATCH 0 of 1] Enhancement: Repo browser quick action icons
Ross Thomas
ross at lns-nevasoft.com
Wed Feb 12 05:13:36 UTC 2020
On 2/11/20 11:20 AM, Ross Thomas wrote:
> The onClick handler needs to return the result of the called function.
I've had a couple of folks ask 'Why?' so I guess this isn't as commonly
understood as I thought.
For those that may not be aware, when the event handler is coded via
html like this:
... onevent="<javascript_code>" ...
The browser adds it to the DOM object as a function similar to this:
function onevent(event_data) {
<javascript_code>
}
which means that if your code fragment does not return a value it is
essentially a void function which (in this case) will not cancel
invocation of the 'href'.
HTH.
Ross.
More information about the kallithea-general
mailing list