For anyone finding this question from a search engine, if your calling element is a link, like so:
<a href="javascript:myFunction(this)">Link</a>
And if your JS looks like this:
function myFunction(caller) {
console.log(caller);
}
Then the output will be incorrect and massive in size!
Instead use:
<a onclick="myFunction(this)">Link</a>
Then the output will be just the calling element.
See also: Which "href" value should I use for JavaScript links, "#" or "javascript:void(0)"?