Strong brand checking in JavaScript

Ok, your point makes sense. So, a frozen stdlib is useful, because that would allow you to get the original version of functions, not the version of functions that were available to you when you were first loaded.

This discussion did inspire me to create a new topic about trying to protect against globlalThis mutations. It goes a slightly different route, but it works, and it even makes brand-checking possible as a natural consequence of having access to the original APIs before they get overwritten.