Yes, it calls the .call function from the context of the documentCreateElement function.
So, in the end, it's the same as ...
documentCreateElement.call(scopeDocument, nodeName);
I assume that somewhere there is a link to Function.prototype.call , for example
var call = Function.prototype.call
They probably cache the call method in case it is overwritten by Function.prototype .
EDIT:
As @ruakh says below, if Function.prototype.call been overwritten, then call.call will not work, as it also relies on Function.prototype .
documentCreateElement is a reference to the document.createElement method, and this method is the host object, so there is no guarantee that it will include Function.prototype in its prototype chain.
This will allow them to use .call for host objects in these cases.
user1106925
source share