I've tried to inspect the AjaxContext that ASP.NET-MVC uses on for instance Ajax Actionlinks and their onSucces, onComplete etc. clientside functions. But I don't understand very much of it... Where is the documentation on this thing?
Does anybody know how to I get the 'target' or 'srcElement' (e.target or window.event.srcElement) when I am in a onSuccess or onComplete javascript event?
<%=Ajax.ActionLink(
"LinkText", "Action", New With {.Controller = "ControllerName"}, 
New AjaxOptions With {
    .UpdateTargetId = "divElement", 
    .OnSuccess = "function(ajaxContext) {console.log(ajaxContext);}"
}) %>
Which results in:
<a 
    href="/Popout/ApplicationCodePopout"
    onclick="Sys.Mvc.AsyncHyperlink.handleClick(
        this, new Sys.UI.DomEvent(event), 
        { 
            insertionMode: Sys.Mvc.InsertionMode.replace, 
            updateTargetId: 'divElement', 
            onSuccess: Function.createDelegate(this, 
                function(ajaxContext) {console.log(ajaxContext);}
            )
        }
    );"
>LinkText</a>