I know that according to ECMAScript specification, non-strict methods will have thisArg transformed to the global object, if null or undefined was passed to them.
That's the reason this code logs the window object (in browsers) instead of null:
function x() {
console.log(this);
}
x.call(null);
What I don't understand, is why doing the same thing with Object.prototype.toString.call(null), doesn't transform null to the global object, but keeps it as null and returns the string [object Null].
Is it because 'use strict' is used in default implementation of toString method?
Is every built-in method run in strict-mode?
I couldn't find anything like that in the specification a https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.prototype.tostring.