<html>
<head>
</head>
<body onload=>
<button></button>
<script>
function give_show(value) {
return function() {
console.log(value);
}
}
var button_element =document.getElementsByTagName('button')[0];
button_element.addEventListener('load',give_show('bong!'),false)
</script>
</body>
</html>
The above code works. in console I got:
bong!
However, if I change this part:
function give_show(value) {
return function() {
console.log(value);
}
to
function give_show(value) {
return function(value) {
console.log(value);
}
I got something like
mouse.event
What's causing that to happen?
FYI: I use Safari console to get the result.