Protect tampering of window, document and undefined