Re:HTML event handler attributes: down the rabbit hole
by hnbad on Wednesday April 27, 2022 @04:45AM
(#31177731)
Yeah, the paragraph immediately preceding the one giving the signature starts with "if $name is onerror" so that's clearly referencing the name of the attribute.
I wonder if the name also reflects capitalization given that HTML element and attribute names are generally case insensitive.
The name of the synthesized function is the attribute name itself. So `<button onclick="alert(arguments.callee.name)">` will alert "onclick" on click.